I am having some trouble getting some code to work properly and was looking for any insight.
I am trying to get a plugin to pull the post's category name as the title....which it does. BUT it is pulling the sub category name and not the actual top level "parent" category.
Here is the site:
http://theadventurebite.com/cookinga...ing-home-page/
Here is the original code which does work:
Code:
switch ($caption_title) { case 'post_category': $cat = get_the_category($my_parent); $cat = $cat[0]; $cat = $cat-> name ; $my_caption_title = $open_h3.$cat.$close_h3; break; case 'post_title':
Code:
switch ($caption_title) { case 'post_category': $category_parent = $my_parent->category_parent; $cat = get_the_category($parent_id); $cat = $cat[0]; $cat = $cat-> name ; $my_caption_title = $open_h3.$cat.$close_h3; break; case 'post_title':
Any ideas??
I am really desperate on this one! Can't find anything!
Thanks so much!
Dani