How can I modify the code so that I get my posts categories classes in the html code, I need it in order to style differently my posts titles according to their category ?
Thank you
How can I modify the code so that I get my posts categories classes in the html code, I need it in order to style differently my posts titles according to their category ?
Thank you
You have to modify the get_posts_by_tag() function to output the category as well.
Thank you !
I've tried to change line 663 from $output .= '<a href="' . get_permalink($post) . '">' . $post->post_title . '</a>';
to this $output .= '<a class="' . implode(' ',get_post_class()). '" href="' . get_permalink($post) . '">' . $post->post_title . '</a>';
And I get my classes in the code, but it's always the same ones from the same post...
any idea why ?
Change this
get_permalink($post) . '">' . $post->post_title . '</a>';
to this $output .= '<a class="' . implode(' ',get_post_class()). '" href="' . get_permalink($post) . '">' . $post->post_title . '</a>';
to
get_permalink($post) . '">' . $post->post_title . '</a>';
to this $output .= '<a class="' . implode(' ',get_post_class('', $post->ID)). '" href="' . get_permalink($post) . '">' . $post->post_title . '</a>';Thank very much you it works perfectly !
Great plugin, very handy !
This topic has been closed to new replies.