Advertisement
Digitalraindrops

content-single.php

Jul 7th, 2011
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php
  2.     global $post;
  3.    
  4.     // DR Start Get the post Category
  5.     $custom = "";
  6.     $categories = wp_get_post_categories( $post->ID );
  7.     if( isset( $categories ) ) {   
  8.         $curr_cat = get_category( $categories[0] );
  9.         $custom = '<h4><a href="'. get_category_link( $categories[0] ) . '">' .$curr_cat->cat_name .'</a><h4>'; // DR Add any Style Class Here!
  10.     }
  11.     // DR End Get the first Category
  12.    
  13.     theme_post_wrapper(
  14.         array(
  15.                 'id' => theme_get_post_id(),
  16.                 'class' => theme_get_post_class(),
  17.                 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '',  
  18.                 'before' => theme_get_metadata_icons('date,author,edit', 'header'),
  19.                 'content' => theme_get_content(),
  20.                 'after' => theme_get_metadata_icons('tag', 'footer'), // DR Optional Remove Categories from array
  21.                 'custom' => $custom // DR Pass in the Category
  22.         )
  23.     );
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement