WordPress.org

Forums

[Plugin: List category posts] Enhancement. Feel free to include in next version. (2 posts)

  1. acub
    Member
    Posted 5 years ago #

    I needed the ability to exclude certain posts from the generated list so here is what I modified:

    in list_cat_posts.php:
    added another parameter on line 42:

    41			'exclude' => '0',
    42			'excludeposts' => '0'
    43		), $atts);

    and on line 57 (now line 58):

    57			'&order=' . $atts['order'] .
    58			'&exclude=' .$atts['excludeposts']);
    59
    60	//Template code:

    Now, all one has to do is add excludeposts=5,15,124 in the list of parameters for catlist and posts with ids 5, 15 and 124 will be excluded.

    Cheers!

    http://wordpress.org/extend/plugins/list-category-posts/

  2. fernandobt
    Member
    Posted 5 years ago #

    Thanks for your code. This is being included on version 0.7 of the plugin.

    Regards!

Topic Closed

This topic has been closed to new replies.

About this Topic