DEV Community

Discussion on: What's the Worst Code You've Ever Seen or Written?

Collapse
 
renegadecoder94 profile image
Jeremy Grifski • Edited

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.

Collapse
 
renegadecoder94 profile image
Jeremy Grifski • Edited

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.

Thread Thread
 
renegadecoder94 profile image
Jeremy Grifski • Edited

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.

Thread Thread
 
itr13 profile image
Mikael Klages

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