Advertisement
Guest User

Untitled

a guest
Nov 20th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. //Check is_shop - Shop base page
  2. // if True then Show Category Header Content of The first Product in Shop base Page
  3.  
  4. if (is_shop()) {
  5. $args = array('taxonomy' => 'product_cat');
  6. $product_categories = get_categories( $args );
  7. $term_id = $product_categories[0]->term_id;
  8. $content = get_term_meta($term_id, 'cat_meta');
  9. if(isset($content[0]['cat_header'])){
  10. echo do_shortcode($content[0]['cat_header']);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement