re: What's the Worst Code You've Ever Seen or Written? VIEW POST


A bit off-topic, but parts of your site confused me a little when I visited the link in your post, so I thought you might like hearing about it.

The "Members" tab shows both "Account" and "Login" no matter if you're logged in or not (And no "log out"). And if you can't see a page it just shows "You are unauthorized to view this page." in small text where the content would be, without telling you if it's because you're not logged in, or don't have a subscription.

There's also no easy way of seeing if an blog post is free or not. If I go Members.Account > Subscriptions > Basic it sends me to /tag/free which lets me filter the free ones, but I don't see a way of getting there from the blog itself. Nor are the tags visible in the blog post list.


All great critiques! Unfortunately, I haven’t found any nice ways to work around them. I’m not a web dev, so I’ve been rocking Wordpress for about 2.5 years now. Solutions to these problems aren’t always clear cut, and I’d prefer not to edit the theme files if I don’t have to.

EDIT: Okay, I fixed at least one of the problems! The unauthorized messaged you get is different if you're logged in or not now. I'm using MemberPress, and they have a shortcode which I've setup like this:

[mepr-show if="loggedin"]Looks like you're logged in, but you don't have a premium membership. If you're interested in getting one, head over to the memberships page and select a tier.[/mepr-show][mepr-show if="loggedout"]Looks like you're not logged in to view this content. If you have an account, feel free to log in below. Otherwise, head over to the memberships page and sign up for a tier. [/mepr-show]

As for the other problems, I'll have to sit and think about them for a bit.


Alright, I just removed the login link altogether. All your account related info should be in the sidebar anyway.

I'll look into the last issue. I'm thinking I might have to add a watermark or something to the images. Otherwise, I'll have to add some custom CSS or something to make free/paid articles clear.

At last, I'm adding borders to the images, so it should be a bit more obvious when something is free (silver border) and when it is not (gold border). Public articles will continue to have no border at all.

Also, I added the free and premium tag links to the top of the blog archive. You should be able to get there in two clicks from the homepage now.

Seems like you've gotten a lot done, looks way better now ^
Even easy to use on mobile.

code of conduct - report abuse