IFELSE problem – I am php incompetent
-
Hi All, – thanks for help up to date.
I am using the Sticky Plugin to include a feature post/Page. It is working. I am experimenting with a a conditional feature on certain categories and that works, but I cannot get the conditionality to work for a Page or Category – Im sure its the way Im writing the code. Or it may be the way the Plugins pointers work checking the post and category.
But if someone can assist in cleaning up the basic code I would be grateful.Basically – I have 2 “checks that are in their own statement – Im sure they can be checked together.
What is happening is the first check operates – ie if is_category but the second feature box does not work – ie it doesnt diplay the post on a specified Page – which it should.
I wouyld preffer that both checks are done at the same time .<div id=”bx”>
<?php get_a_post(53); ?>
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php if(is_category(’12’) || is_category(‘5’) || is_category(‘8′) || is_category(’27’) || is_category(‘7’) ) : ?>
<h2>Featured Post</h2>
<?php get_a_post(57); ?>
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php endif; ?>
</div><div id=”bx”>
<?php if(is_page(‘6’) ) : ?>
<h2>Featured Post</h2>
<?php get_a_post(57); ?>
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php endif; ?>
</div>Please excuse my code – I am not up to speed in php.
Anybody – any assistance is welcome.
Thanks – keep well.
- The topic ‘IFELSE problem – I am php incompetent’ is closed to new replies.