August 23, 201115 yr Hello Guys take a look here http://94.136.40.103/~x2uk.com/ On the front page of this site I have made an area where my client would like the title of the latest blog post to be injected and to only show the Latest blog posts of a particular category let's say "Latest News" This way they can control which announcements go to the front page. Ideally the blog title would also click through to that blog post. I wondered if anybody has done anything like this before and suggest a way I can go about it . Many Thanks Luke
August 23, 201115 yr Author Hi Guys I sussed It , I used this piece of code which allowed me to select a category number , the amount of posts to show and then to create a title with permalink. <?php $featuredPosts = new WP_Query(); $featuredPosts->query('showposts=1&cat=14'); while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?> <i>... Read Story</i></a> <?php endwhile; ?> Thanks to anybody that was considering helping me , hopefully this will help some people out too
Create an account or sign in to comment