Thesis: categories before headlines


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /*--------------------------------------------------*/
  2. /** add categories before headlines */
  3. /*--------------------------------------------------*/
  4.  
  5. function show_cat () {
  6. if (is_home())
  7. $category = get_the_category();
  8. echo '<p class="show_cat">' . $category[0]->cat_name . '</p>';
  9. }
  10.  
  11. /*add_action('thesis_hook_before_headline', 'show_cat');*/
  12. add_action('thesis_hook_before_teaser_headline', 'show_cat');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.