WordPress.org

Ready to get started?Download WordPress

Forums

Special Recent Posts
[resolved] php mode category filter not working (4 posts)

  1. qzha017
    Member
    Posted 1 year ago #

    Hi Luca excellent plugin but the php category filter is not working can you please check it out?

    <?php
    // Defining widget options.
    $args = array(
        'post_limit'       => 5,
        'post_random'      => 'yes',
        'category_include' => 3, 7
    );
    
    // Function call.
    special_recent_posts($args);
    ?>

    The category filter dose not work. It only filters the first category ie 3 and ignores category 7

    Thanks
    Alex

    http://wordpress.org/extend/plugins/special-recent-posts/

  2. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    you have to enclose the categories IDs with quotes:

    <?php
    // Defining widget options.
    $args = array(
    'post_limit' => 5,
    'post_random' => 'yes',
    'category_include' => '3, 7'
    );

    // Function call.
    special_recent_posts($args);
    ?>

  3. qzha017
    Member
    Posted 1 year ago #

    ah yes that worked thank you so much for responding so fast

  4. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, you're welcome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic