Recent Posts From Category

Community Forums Forums Design Tips and Tricks Recent Posts From Category

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  braddalton 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #42164

    Post count: 10

    Hi, wondered if anyone could help with this. Am trying to show a list of the 3 latest posts, excluding category 6, however my $projects array is not working. ie The posts are displayed but are not limited to 3 and category 6 is not being excluded.


    ////* 45: Add [recent_projects] shortcode */
    function ff_recent_projects_list() {
    echo ‘<ul>';
    $projects = array( ‘numberposts’ => 3, ‘exclude’ => 6 );
    $recent_projects= wp_get_recent_posts( $projects );
    foreach( $recent_projects as $recent ){
    echo ‘<li><a href=”‘ . get_permalink($recent[“ID”]) . ‘” title=”Look ‘.$recent[“post_title”].'” >’ .   $recent[“post_title”].'</a> </li> ‘;
    echo ‘</ul>';
    return ob_get_clean();
    add_shortcode( ‘recent_projects’, ‘ff_recent_projects_list’ );




    Post count: 9597

    Hi! I’m working through the older unanswered posts today. As this thread is over three months old, I hope you have been able to get a resolution to your question. If not, can you please check in, and I will get it escalated for you.

    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts


    Post count: 10

    Hi Susan,

    Best of luck with the unanswered posts! Unfortunately I haven’t had a response so any help would be appreciated.



    Post count: 10668

    You can use the blog page template on the home page using the Reading Settings and exclude posts from any categories using the Genesis > Theme Settings > Blog Page Template.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.