Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $post;
- // DR Start Get the post Category
- $custom = "";
- $categories = wp_get_post_categories( $post->ID );
- if( isset( $categories ) ) {
- $curr_cat = get_category( $categories[0] );
- $custom = '<h4><a href="'. get_category_link( $categories[0] ) . '">' .$curr_cat->cat_name .'</a><h4>'; // DR Add any Style Class Here!
- }
- // DR End Get the first Category
- theme_post_wrapper(
- array(
- 'id' => theme_get_post_id(),
- 'class' => theme_get_post_class(),
- 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '',
- 'before' => theme_get_metadata_icons('date,author,edit', 'header'),
- 'content' => theme_get_content(),
- 'after' => theme_get_metadata_icons('tag', 'footer'), // DR Optional Remove Categories from array
- 'custom' => $custom // DR Pass in the Category
- )
- );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement