Exclude one child category from Post display
-
Hey all,
I am using the code below to display the first Post from a category, but is there any way I could ammend it slightly so that one of the child categories is excluded from this?
I have tried using ‘exclude’ as an argument but it did not work.
Thanks.
<!-- Top News Story Sidebar --> <div class="rightColItem rc_news rc_title"> <a href="<?php echo get_permalink(67); ?>">Latest news</a> <? $post = get_posts(array('cat' => 75)); $post = $post[0]; $post->post_content = explode('.', strip_tags($post->post_content)); $post->post_content = $post->post_content[0]; ?> </div> <div class="rightColItem rc_newsItems pinkLinks rc_bottPadding"> <ul class="rc_linkList"> <li class="link_arrow"><a href="<?=$post->guid?>"><?=$post->post_title?></a></li> </ul> <p><?=$post->post_content?>. <a href="<?=$post->guid?>">Read more...</a></p> </div>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Exclude one child category from Post display’ is closed to new replies.