If parent category is PHP/Functions help
-
This code (below) I need help with.. It does not seem to check the parent category ID, so it jumps right to the end… I appreciate any help! Thanks..
<title> <?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $ep_category = get_the_category(); if ($ep_category->category_parent == 498) { ?> Watch <?php the_title(); ?> 01010101011 | <?php $ep_title_category = $ep_category; echo $ep_title_category[0]->cat_name; } else if ($ep_category->category_parent == 500) { ?> Watch <?php the_title(); ?> 1010101101 | <?php $ep_title_category = $ep_category; echo $ep_title_category[0]->cat_name; } ?> <?php endwhile; endif; elseif(is_home()) : ?> 0101010101101011 <?php endif; ?> </title>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘If parent category is PHP/Functions help’ is closed to new replies.