It’s Magic

Posted by Dan Romanchik on Mar 2, 2011 in Web Design, Web Development, WordPress |

Magicians are known for making things disappear. Well, web developers can be magicians, too. Let me explain.

One of the websites I’m currently working on uses WordPress as a content-management system, and the theme I’m using is a cusomization of the Thesis theme. (I’m not particularly enthralled with Thesis, but the client is, and what the client wants, the client gets.)

The client did not want to allow comments on pages, but also did not like the text, “Comments on this entry are not allowed” that appeared on those pages. So, the question was  how to make that text disappear? Unfortunately, you can’t just change a setting to make this happen.

At first, I thought I might actually have to change the code. The solution turned out to be a lot simpler, though.

In looking at the HTML source, I noted that that particular text was in a <div> with the class “comments_closed”.  So, all I had to do was to add the following line to custom.css:

.comments_closed {visibility: hidden;}

and, POOF!, the text disappeared.

 

Reply

You must be logged in to post a comment.

Copyright © 2012 Web Publishing Group All rights reserved.
Desk Mess Mirrored v1.0.8 theme from BuyNowShop.com.

Switch to our mobile site