WPIntell

Source evidence

Need a PHP query! If no subtitle is entered, the category name(s) should be disp

Subtitle 360 · support · 2012-12-02T02:38:00+00:00

complaintsentiment
mediumseverity
0.86relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 22 rows with source links

27.3% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

16 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Jonathan unresolved
I’m stuck! Would you help me? I need a PHP query: – If no subtitle is entered, the category name(s) should be displayed. Thanks in advance! Hi iwd82, Please try following code and let me know is it work 😉 <?php if (function_exists('the_subtitle') ){ the_subtitle(); }else { ?> single_cat_title(); <?php }? ~Ben Thanks for your reply Ben! Unfortunately, your suggestion does not work. I think it may not work, because the query is based on the activated function. After the plugin was enabled, no category will be displayed, because the subtitle is functionally exist. What do you think about this: <?php if($page_sub_title) { echo $page_sub_title = get_post_meta($post->ID, 'page_sub_title', true); } else { echo $category = the_category(', '); } ?> I guess that could work. Jonathan

Comments

2 shown
HasanulBanna 2012-12-08T16:04:00+00:00

Hi iwd82, Please try following code and let me know is it work 😉 <?php if (function_exists('the_subtitle') ){ the_subtitle(); }else { ?> single_cat_title(); <?php }? ~Ben

Jonathan 2012-12-12T17:03:00+00:00

Thanks for your reply Ben! Unfortunately, your suggestion does not work. I think it may not work, because the query is based on the activated function. After the plugin was enabled, no category will be displayed, because the subtitle is functionally exist. What do you think about this: <?php if($page_sub_title) { echo $page_sub_title = get_post_meta($post->ID, 'page_sub_title', true); } else { echo $category = the_category(', '); } ?> I guess that could work. Jonathan