Hi Cristián. Thanks for the reponses. Seems clearer now and I understand why you chose the route you did but it isn’t good for me nor for many others – maybe you should put it to a vote? Without conditionals on every post it also means, for example, that rich snippets are a waste of time in posts where otherwise they could be very helpful. There are many other examples of why this isn’t satisfactory. Another is because it means that adjusts to levels or other tests on membership level will have to be edited on every post – for example, say one decides to implement ‘content dripping’ later on – just not going to happen, is it?
I think you misunderstood this question:
Can you think of a quick way I can remove the category restriction and bulk set a membership level for the posts I have removed from category restriction?
You wrote:
Just remove the category’s ID from the Category Restriction and save. Dashboard -› s2Member® -› Restriction Options -› Category Access Restrictions
If the post is still restricted after that, check if it isn’t also being restricted by the Post, Tag or URI restrictions. Dashboard -› s2Member® -› Restriction Options
I meant that I’ve removed category restriction on 100 posts. How can I quickly implement some restriction – without having to edit each post? Probably no way…
The difficulty with the template approach is that a particular template may not be set up to work well with the scripting. For example, suppose I use this:
<?php
if ($categories = get_categories ())
{
foreach ($categories as $category)
{
if (!is_permitted_by_s2member ($category->cat_ID, "category"))
continue;
/* Skip it. The current User/Member CANNOT access this Category,
or any Posts inside this Category, or any of its sub-Categories. */
}
}
?>
So, we’re back to using category restrictions because otherwise I’d have to set up templates for each type of post and the way it can be accessed by a particular level. And, as we know, category restrictions are the most prohibitive.
In my single post template I’ve got lots of stuff but basically the main code is this one:
<?php the_content(); ?>
So, where would I put any php conditionals around that? The ‘more’ tag doesn’t work in single posts (it is ignored). Even if I add
<?php the_excerpt(); ?>
BEFORE the content reference I will still have to go back and edit all of my posts again as otherwise this will appear as duplicate copy so there is no advantage at this stage in trying a template approach because either way (template or post only conditionals) I will have to re-edit each post – I have over 400 posts. Also, in trying to use rich snippets I can’t do this using a template approach.
All of this goes to show that planning the use of a plugin like S2 for a user is the most important thing before its installation and deployment. However, given its complexity (and therefore its usefulness – it is a great plugin by the way) this is hard to do if one has no experience in its use prior to installing it. Maybe we could all work on a list of considerations prior to deployment?