WordPress.org

Ready to get started?Download WordPress

Forums

Special Recent Posts
Filtering by category (4 posts)

  1. ste5mins
    Member
    Posted 1 year ago #

    It's correct this string?

    <?php

    // Defining widget options.
    $args = array(

    // Set thumbnail width (default 100)
    'thumbnail_width' => '80',
    // Set thumbnail height (default 100)
    'thumbnail_height' => '80' ,
    // Set displayed post content length (default: 100)
    'post_content_length' => 0,
    // Display post date? (default: 'yes')
    'post_date' => 'no',
    // Set string break text (default: [...])
    'string_break' => '',
    // Display thumbnails? (default: 'yes')
    'display_thumbnail' => 'yes',
    'post_limit' => 1,
    'post_random' => 'no',
    // Filter posts by including categories IDs. (default: none)
    'category_include' => 14
    );

    // Function call.
    special_recent_posts($args);

    ?>

    I can filter by 2 / 3 or more category!

    Thank You!

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

  2. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    You wrote that you can, so what's the matter?

  3. qzha017
    Member
    Posted 1 year ago #

    I think he can't, when I use the php code in my template file only one category can be filtered. The first category number will be filtered, eg if I put in 3,4,7 only category 3 will be shown, if there is no post in category 3 and many posts in category 4 and 7 then it will say "No posts available"

    Can you please check into it?
    Thanks
    Alex

  4. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    You have to enclose your categories IDs with quotes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic