PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

List category posts plugin

s2Member Plugin. A Membership plugin for WordPress®.

List category posts plugin

Postby sunriseweb » November 3rd, 2011, 10:31 am

Hi,
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
User avatar
sunriseweb
Registered User
Registered User
 
Posts: 2
Joined: October 25, 2011

Re: List category posts plugin

Postby sunriseweb » November 3rd, 2011, 10:55 am

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
}
User avatar
sunriseweb
Registered User
Registered User
 
Posts: 2
Joined: October 25, 2011

Re: List category posts plugin

Postby Eduan » November 3rd, 2011, 11:13 am

Okay, well glad you figured it our.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: List category posts plugin

Postby Cristián Lávaque » November 3rd, 2011, 11:57 pm

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. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron