latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: raju maharjan

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
S2 members not working with Themeforest theme

By:  raju maharjan in: Community Forum

voices: 1
replies: 0

4 years, 1 month ago  raju maharjan

Viewing topic 1 (of 1 total)

Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
S2 members not working with Themeforest theme

By:  raju maharjan in: Community Forum

voices: 1
replies: 0

4 years, 1 month ago  raju maharjan

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Dec 4th, 2012 at 2:40 pm #33462

Use the following code in single.php.

The code below is to make sure all the posts in the the category “magazine” and its sub categories are protected and they can be accessed only with the custom capability -> magazine.


 <?php if (in_category ("magazine")||post_is_in_descendant_category( get_term_by('slug','magazine','category')) && !current_user_can ("access_s2member_ccap_magazine"))
				 {
				
				$membership_page =  get_bloginfo('url')."/membership";
				
				echo "<script>window.location.href='".$membership_page."'</script>";
				
				 }
				
				//the_content('');
				
				else{
					the_content('');
				}
				?>
Viewing 1 replies (of 1 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.