Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Comments, trackbacks & pings (http://forum.bytesforall.com/forumdisplay.php?f=19)
-   -   Styling "Comments are closed" (http://forum.bytesforall.com/showthread.php?t=13768)

Jam Apr 13, 2011 04:19 AM

Styling "Comments are closed"
 
Hi all, I did a search but only found how to remove "Comments are closed". I would like to retain the words but be able to style them to match the rest of the text in that line (that lists categories the post is included in).
Currently on a page that lists all posts in a category, "Comments are closed" is bold on each post extract, I'd like to remove that attribute.

Example category page

On the page of the post alone, the "Comments are closed" (at the bottom of post) is not bold, and not uppercase.

Atahualpa 3.4.9,
thanks in advance

juggledad Apr 13, 2011 04:25 AM

Look at the source, find the element, use it's ID or CLASS to create a CSS selector ant rule and put them in the CSS Inserts

Jam Apr 13, 2011 05:06 AM

Hmm, thanks Juggledad,
I was able to add to CSS inserts

Quote:

div.post-footer {
font-weight: normal;
text-transform: uppercase;
}
but "Comments are closed" was still bold. I did some googling and found the CSS rule to lighten and added !important and finally was unbold. Not ideal, but normal, even with !important did nothing.

This will do me,

Quote:

div.post-footer {
font-weight: lighter !important;
text-transform: uppercase;
}
thanks again.

Jam Jun 11, 2011 05:08 AM

Update from jasonb (PM'd to me as Post was Closed)

Quote:

I came across your post because I had exactly the same problem. However, I found the proper solution.

The issue is that the Atahualpa theme doesn't allow this to be styled, except with the quasi-"shotgun" approach that you came up with. Rather, it forces the bold on you in the php code itself. But it's easily fixed.

Edit functions/bfa_postinfo.php and make the following change around line 323:

Before
Code:

if (!comments_open() ) {
if ($post->comment_count == 0) {
$comment_link = '<strong>' . $comment_matches[8] . '</strong>';
} else {
$comment_link = $comment_link . ' - <strong>(' . $comment_matches[8] . ')</strong>';
}

After
Code:

if (!comments_open() ) {
if ($post->comment_count == 0) {
$comment_link = $comment_matches[8];
} else {
$comment_link = $comment_link . ' - (' . $comment_matches[8] . ')';
}

That's the correct fix. (In my case I also removed the "- ()" in the second section - so I can manually add it to my comments closed text if I want it.)

You could also replace the original <strong> with <div name="comments-closed"> so that you could properly style it back in the HTML/CSS Inserts section in case you wanted more control.

If you could reopen your thread and post this there for others that would be great.


All times are GMT -6. The time now is 10:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.