Php if within if problem (is_home function)
-
Hi, I’m trying to figure out how to include a custom php string within WordPress’s is_home() function. The catch is I want it to be surrounded by a div.
My current setup looks something like this:
<?php if ( is_home() ) { <div class="unimportant"> if(function_exists('tptn_show_daily_pop_posts')) tptn_show_daily_pop_posts(); </div> } ?>but it throws a syntax error. The custom string looks this unmodified:
<?php if(function_exists('tptn_show_daily_pop_posts')) tptn_show_daily_pop_posts(); ?>.It should look something like this: if is_home: div—tptn_show_daily_pop_posts—/div. The solution should be a rather quick one, but I’m having issues with syntax.
Thanks in advance for your replies.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Php if within if problem (is_home function)’ is closed to new replies.