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.

Protecting the archives page…

Home Forums Community Forum Protecting the archives page…

Tagged: ,

This topic contains 3 replies, has 2 voices. Last updated by  Jim Reamer 4 years, 7 months ago.

Topic Author Topic
Posted: Sunday Jun 3rd, 2012 at 2:46 pm #15286
Jim Reamer
Username: jwrbloom

I want the Posts which show up on my homepage to be viewable for free by anyone registered. I want the Users to have to subscribe should they want to view any Posts further back, which would show up on the Archive page. I’d like the same thing for Search Archives too.

I see Search listed in the Alternative views section, but I don’t want to change my structure until I can protect all Archive views. I tried using the URI option, but it didn’t work.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Jun 5th, 2012 at 2:27 pm #15560
David Welch
Username: dwbiz05

Have you tried using the php conditionals in your archives.php theme file around the loop content?

Something like….

<?php
if(current_user_can('access_s2member_level1')){
	/*loop content here*/
}
else {
	echo 'You do not currently have access to this page. Please register.... blah blah blah';
}
?>

I just did that from memory so excuse any errors… lol.

NOTE: if you don’t have an archive.php you could do the same thing your index or other template page, but you’ll need to check more info about the content to make sure it’s archived posts.

Hope that helps,
Dave

Posted: Tuesday Jun 5th, 2012 at 2:33 pm #15561
Jim Reamer
Username: jwrbloom

I did, but I wanted to see if there was something else that would allow them to see the Post titles but not access the Posts’ content.

Could I wrap the links in that conditional? Meaning, if they’re not subscribers, they just see the title without it being linked.

Posted: Friday Jun 8th, 2012 at 1:56 pm #15938
Jim Reamer
Username: jwrbloom

I’m having a hard time locating where it should go on the archive.php file.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.