Page 1 of 1
Adding tags to pages
Posted:
April 19th, 2011, 5:10 pm
by cassel
As i want to create some custom packages to my s2Member. Following the video tutorial, i would have to add a list of tags for the pages i want in package 1, and package 2 and so on. But i am missing a little detail somewhere along the line. Where do i add the tags to the pages so that my custom packages recognize them? In my WP, i cannot see anywhere to add tags to pages (or categories). I can only see how to add them to posts, but not to pages.
Re: Adding tags to pages
Posted:
April 19th, 2011, 5:28 pm
by cassel
Maybe i am replying to myself, but is it really tags i should add or do i call the custom package under the :
Require Custom Capabilities? that shows on the right when i edit a page?
I mean, do i list the name of the "packages" this page can be viewed under? Or do i have to list the packages in which the page can be viewed? Just unsure in which direction i am going.
Re: Adding tags to pages
Posted:
April 19th, 2011, 9:20 pm
by Cristián Lávaque
I'd go with the custom capabilities, as you supposed in the end.
Just create a custom capability for each package and name them something like
package1,
package2 for example. Then you add those to the member accounts or set it up so they get them with the button/pro-form.
So, if you have these posts/pages with these custom capabilities:
post1 package1,package2
post2 package2
post3 package1
page2 package1
page5 package2
Then those with custom capability
package1 will be able to see posts 1, 3 and page 2, while those with custom capability
package2 will see posts 1, 2 and page 5.
Does that help?
Re: Adding tags to pages
Posted:
April 19th, 2011, 9:25 pm
by cassel
It does help, somewhat. My "problem" is that if i add more pages in a certain category that is part of package1, then, i will have to go back and edit the package list, right?
I figured (from the video) that the POSTS can have tags, and one custom package can include "all the posts with tag X", so whenever a new post was added, simply adding the tag would automatically incorporate it into the appropriate package. I thought i could do the same with PAGES. Can i? I find that when i have 200+ pages, it might get a bit... tedious to edit those custom packages.
On the other hand, since my PAGES will all be children of a parent page, is there a way to "group" those inside a package?
Re: Adding tags to pages
Posted:
April 19th, 2011, 10:27 pm
by Cristián Lávaque
cassel wrote:It does help, somewhat. My "problem" is that if i add more pages in a certain category that is part of package1, then, i will have to go back and edit the package list, right?
But the package's content will be dynamic based on what page/post you mark as being in that package.
cassel wrote:I figured (from the video) that the POSTS can have tags, and one custom package can include "all the posts with tag X", so whenever a new post was added, simply adding the tag would automatically incorporate it into the appropriate package.
Say that same sentence changing the word "tag" with "custom capability" and "post" with "post/page".
I figured (from the video) that the posts/pages can have custom capabilities, and one custom package can include "all the posts/pages with custom capability X", so whenever a new post/page was added, simply adding the custom capability would automatically incorporate it into the appropriate package.
Re: Adding tags to pages
Posted:
April 20th, 2011, 4:52 am
by cassel
I know i am probably dense,but do you mean here i add the different packages?
Like i said, i cannot figure out WHERE to indicate all those.
Re: Adding tags to pages
Posted:
April 20th, 2011, 7:57 am
by bluecafe
Re: Adding tags to pages
Posted:
April 20th, 2011, 9:05 am
by Cristián Lávaque
cassel wrote:I know i am probably dense,but do you mean here i add the different packages?
Yes, there you'd add the custom capabilities to protect the whole page.
bluecafe wrote:If a tag function for pages help you could use the following plugins
Thanks! I thought about that, but I haven't checked to see if adding tags to pages with those will have the tag restriction work on them too. Could be tried, though.
Re: Adding tags to pages
Posted:
April 20th, 2011, 5:17 pm
by cassel
So, following Christian's post, it means that if i put the "tags" where that red rectangle is (under "Require Custom Capabilities?") , like "music", "tutorials", etc. those are the tags that can be included in the Custom Capability Packages, when i write that code in the functions.php file, AND when i create the Paypal button to generate the shortcode? I surely would like that flexibility so i could simply generate a paypal button for the category identified by that "tag" and they all be added to what the customer purchased.
If i am right, do i really need those plugins suggested by bluecafe (thanks) or will it do the very same thing?
Re: Adding tags to pages
Posted:
April 20th, 2011, 7:36 pm
by Cristián Lávaque
The plugins suggested allow you to add tags to pages, which you don't need when using custom capabilities.
What I'm suggesting is that you use custom capabilities, which aren't tags, they're used differently and I wouldn't call them tags unless you want to confuse those you talk to about it. Although you can list the required custom capabilities for a page/post, they're not tags.
s2Member's tag restrictions work with levels, which inherits all the qualities of the levels, which is not what you're looking for because you can't specify what tags a user can have access to, you can control what levels they have access to.
So if you create
package1 and
package2 with tags, they'd either be at the same level, which would give either group access to the other group's tag, or one would be at a level above the other one, which would give the higher one access to the content of both groups.
Membership Levels provide incremental access:
* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.
* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.
* A Member with Level 2 access, will also be able to access Levels 0 & 1.
* A Member with Level 1 access, will also be able to access Level 0.
* A Subscriber with Level 0 access, will ONLY be able to access Level 0.
* WordPress® Subscribers are at Membership Level 0. If you're allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.
Custom capabilities, though, don't have those limitations. They do let you separate the groups while being at the same level and not having the incremental access quality.
The button generator lets you specify what custom capabilities will be added to the account that makes the purchase with that button.
Please read
WP Admin -> s2Member -> API / Scripting -> Custom Capabilities and watch
http://www.s2member.com/custom-capabilities-video/I hope that helps you understand it better.
Re: Adding tags to pages
Posted:
April 20th, 2011, 9:26 pm
by cassel
*sigh* you are trying so hard to explain but i still dont get it. I viewed the video (more than once) and i feel i am still missing a piece of the puzzle.
Maybe i can spell out the steps i understand and you can then correct my reasoning.
- i create 20 different pages; 10 are about music and 10 are about videos
- i want to create one package for the 10 music pages, and one package for the 10 video pages
*** here is where i am not sure where to enter the word/name/page ID/whatever to identify the 10 pages for each package***
- i create that routine in php (if it is called like that) to check if UserA has access to the music package, or the video package or other -
- if i create one paypal button for the music package and one button for the video package (using the "keywords" like in the video)
If i can get this far (which is not done with me!) i might do ok, but then, if next week, i add 2 more pages about music and 3 more about video, and i want the users who already purchased the music package or the video package to get access to those also, without having to redo a new paypal button to add more pages and so on.
I am likely turning in circles.
I sure want to use those custom capabilities as i feel it is exactly what i need to use.
Re: Adding tags to pages
Posted:
April 20th, 2011, 9:54 pm
by Cristián Lávaque
You're almost there.
cassel wrote:*** here is where i am not sure where to enter the word/name/page ID/whatever to identify the 10 pages for each package***
cassel wrote:- i create that routine in php (if it is called like that) to check if UserA has access to the music package, or the video package or other -
You don't need to use PHP if you use that box to add the custom capabilities required for each page/post.
cassel wrote:if next week, i add 2 more pages about music and 3 more about video, and i want the users who already purchased the music package or the video package to get access to those also, without having to redo a new paypal button to add more pages and so on.
When you create the page/post and add the custom capability required for it using the box shown above, the users who have access to content with that custom capability, will automatically have access to that page/post without having to purchase again.
Re: Adding tags to pages
Posted:
April 20th, 2011, 10:06 pm
by cassel
Oh!!!
So, here is what i should do:
- in that red outlined box, i would enter "music" on all the music related pages, "video" on all the video related pages
- then, i would create a paypal button that will be only for Music for the music package, one with the keyword video for the video package
- then, whenever i add a page with the word "music" or "video" in that red outlined box, it will be automatically included
Do you have to restrict access to those pages or is it automatically done by simply entering something in the Custom Capability box?
(i am seeing the light!)
Re: Adding tags to pages
Posted:
April 20th, 2011, 10:17 pm
by Cristián Lávaque
You got it. That's what you have to do.
The restriction to the page is created when you add the custom capability to the box (see its title: "Require Custom Capabilities?").
One more tip: When you add custom capability (e.g. music, video) to the button, start with a plus sign: +video. This way, new custom capabilities will be added to existing ones instead of replacing them.
Re: Adding tags to pages
Posted:
April 20th, 2011, 10:23 pm
by cassel
Thanks!
Do you mean the plus sign to be included i the button for Paypal ?
Also, i might want to suggest that the mention of that "red outlined box" be spelled out in the video. I think that is the one tiny detail that was skipped (or well hidden) as i never saw it.
Re: Adding tags to pages
Posted:
April 20th, 2011, 10:29 pm
by Cristián Lávaque
It is possible that when the video was shot, the box was still not available in s2Member. Thanks for the suggestion.
Yes, you'd add the plus sign before the custom capabilities in the button, not the box in the pages. The button generator has a field for the custom capabilities titled "Custom Capabilities ( comma-delimited ) [?]" Click the question mark too, it'll give you a bit more help.
Re: Adding tags to pages
Posted:
April 20th, 2011, 10:47 pm
by cassel
Fantastic. Told you there was a little something missing. That was the missing link! Now, i finally get it!
Thanks for your patience! It paid off.
Re: Adding tags to pages
Posted:
April 20th, 2011, 10:55 pm
by Cristián Lávaque
- light_at_end_of_tunnel_12.jpg (10.11 KiB) Viewed 257 times
Re: Adding tags to pages
Posted:
July 5th, 2011, 12:05 pm
by samroloff
Ok thanks for posting all this I was having the same issue.
But now that I am creating a paypal button, i realize that we are not charging this group for access but we are creating their accounts for them so only they can see a certain page, so is there a way to add a user with this new method for free?
Re: Adding tags to pages
Posted:
July 5th, 2011, 1:54 pm
by samroloff
Maybe I should just add the new users and then somehow apply this new level to them but how?
Re: Adding tags to pages
Posted:
July 5th, 2011, 2:00 pm
by samroloff
There must be a way to apply a new level of membership to an existing user without having to use a paypal button, does anyone know?
Re: Adding tags to pages
Posted:
July 5th, 2011, 2:04 pm
by cassel
If it is only changing level like from 0 to 1, you can go in your wordpress dashboard under Users and there, you can list all the users, check on the left which ones you want to change level, and on top, there is a drop down menu (just above the list of users) CHANGE ROLE TO... and you can choose which level you want to change them all. This works ONLY for level changes and not for additional custom capabilities. Maybe it would help?
Re: Adding tags to pages
Posted:
July 5th, 2011, 2:09 pm
by samroloff
Cassel, thanks but I ran out of the first four levels and need to do a custom capabilities, do you know of a way?
Re: Adding tags to pages
Posted:
July 5th, 2011, 2:17 pm
by cassel
I dont know of a way to edit in groups. You can edit manually one by one (i had to do it myself). For that, you click EDIT under the user avatar or username and then at the bottom of the page, you will have s2Member Configuration & Profile Fields and in there, you will see a field with Custom Capabilities. You just enter them as needed (for example, in my case i had to add "basic,forum"). Hope it helps and hope you dont have too many to edit like that!
Re: Adding tags to pages
Posted:
July 5th, 2011, 7:03 pm
by samroloff
thanks Cassel, that worked like a charm!