Styling title CSS when displaying multiple full posts on a page
-
Hi Sudar,
I’ve been using the following shortcode to display full posts on a page:
[posts-by-tag tags = “Animation” number = “5” content = “true”]
And it works great, so thanks for that.
The one problem I had was that entry titles were being outputted without CSS tags, so I thought I might suggest adding this in as a possible improvement in a future version.
At the very least, I figured I’d post my suggested code (that seems to be working) here for anyone else who might have the same problem 🙂
Starting at line 939, replace:
// add permalink $output .= '<a href="' . $permalink . '"'; if ($link_target != '') { $output .= ' target = "' . $link_target . '"'; } $output .= $onclick_attr; $output .= '>' . $tag_post->post_title . '</a>';with
// add permalink and style post title $output .= '<h1 class="entry-title"><a href="' . $permalink . '"'; if ($link_target != '') { $output .= ' target = "' . $link_target . '"'; } $output .= $onclick_attr; $output .= '>' . $tag_post->post_title . '</a></h1>';The CSS for this particular example would be:
h1.entry-title a { /*styling goes here*/ }Regards,
Joe
The topic ‘Styling title CSS when displaying multiple full posts on a page’ is closed to new replies.