php - Wordpress Title Error -



php - Wordpress Title Error -

<?php $custom_store_title = isset(appthemes_get_custom_taxonomy($post->id, app_tax_store, 'name')); ?> <head> <?php if (isset($custom_store_title)) { echo "<title>".$custom_store_title." coupon codes | ". $custom_store_title." promo codes</title>"; } else { echo "<title>" . wp_title(' ') ." | ". bloginfo('name'). " </title>"; } ?> </head>

condition not working properly.

can help me?

you have

$custom_store_title = isset(appthemes_get_custom_taxonomy($post->id, app_tax_store, 'name')); ?>

which means $custom_store_title set either true or false.

then have:

if (isset($custom_store_title)) // if (true), essentially. { // ... } else { //this never happen }

what need is:

$custom_store_title = appthemes_get_custom_taxonomy($post->id, app_tax_store, 'name')); if (isset($custom_store_title)) { //do stuff } else { //do else }

php wordpress

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -