WordPress.org

Support

Support » Plugins and Hacks » [Resolved] php mode category filter not working

[Resolved] php mode category filter not working

  • 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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Luca Grandicelli
    Member

    @lgrandicelli

    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);
    ?>

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

    Plugin Author Luca Grandicelli
    Member

    @lgrandicelli

    Ok, you’re welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] php mode category filter not working’ is closed to new replies.