Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-03T23:57:50-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15767 2011-11-03T23:57:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15767&p=50973#p50973 <![CDATA[Re: List category posts plugin]]>
sunriseweb wrote:
Figured it out. I edited the "List category posts" plugin "custom template" I made and used the is_protected_by_s2member() function - works like a charm - and it covers off cases where the post is in a protected category, etc. (not just limited to cases where the post itself is explicitly protected).

e.g.
if(!is_protected_by_s2member($single->ID)) {
//build post display
}


Great! Glad you sorted it out and thanks for sharing your solution with the rest. :)

Statistics: Posted by Cristián Lávaque — November 3rd, 2011, 11:57 pm


]]>
2011-11-03T11:13:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15767&p=50908#p50908 <![CDATA[Re: List category posts plugin]]> Statistics: Posted by Eduan — November 3rd, 2011, 11:13 am


]]>
2011-11-03T10:55:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15767&p=50906#p50906 <![CDATA[Re: List category posts plugin]]>
e.g.
if(!is_protected_by_s2member($single->ID)) {
//build post display
}

Statistics: Posted by sunriseweb — November 3rd, 2011, 10:55 am


]]>
2011-11-03T10:31:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15767&p=50903#p50903 <![CDATA[List category posts plugin]]> I am using the "List category posts" plugin by Fernando Briano (http://picandocodigo.net/programacion/wordpress/list-category-posts-wordpress-plugin-english/), and the protected posts are not being filtered out.

I do have "Filter ALL WordPress® queries; protecting all Alternative Views." checked off.

This plugin uses "get_posts" to retrieve the posts to display in the class "CatList" using the private function "lcp_set_categories" (i.e. where the arguments for get_posts are set).

Not sure if I can add "attach_s2member_query_filters();" to the List category posts plugin code to filter out the protected posts or not.

Thanks,
Brad

Statistics: Posted by sunriseweb — November 3rd, 2011, 10:31 am


]]>