Adding this snippet to the functions.php of your WordPress theme will add a custom class to links output by the_tags template tag. function add_class_the_tags($html){ $postid = get_the_ID(); $html = str_replace(‘<a’,'<a class=”wpsnipp”‘,$html); return $html; } add_filter(‘the_tags’,’add_class_the_tags’,10,1);
Posts By: Renat
Twitter Bootstrap Button Text Word Wrap
In order to get Twitter Bootstrap buttons text to wrap onto multiple lines do the following: Add white-space: normal; to the style definition of the Bootstrap Button. .btn { white-space: normal; }
Add class to next and previous post_link
I recently needed to use this for a theme I was building figured I would post the results up here for everyone. Adding this snippet to the functions.php of your WordPress theme will add a custom class to next and previous post_link. function add_class_next_post_link($html){ $html = str_replace(‘<a’,'<a class=”next”‘,$html); return $html; } add_filter(‘next_post_link’,’add_class_next_post_link’,10,1); function add_class_previous_post_link($html){ $html =
Display author avatar within posts or pages
Adding this snippet to your WordPress theme within the loop will display the current authors avatar. <?php echo get_avatar( get_the_author_email(), ’60’ ); ?>