Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-19T10:51:31-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16310 2011-12-19T10:51:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56920#p56920 <![CDATA[Re: List childpages only if custom capability is paid for]]> could you please send a request using that form?
It's our standard way of handling jobs.

Statistics: Posted by Eduan — December 19th, 2011, 10:51 am


]]>
2011-12-19T08:38:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56914#p56914 <![CDATA[Re: List childpages only if custom capability is paid for]]> This is the last thing left on my project :)
I'd really like to get this done, but I just can't figure out how.
I'm realizing this is not a common question, and of course I can pay you for this. Should I send my request using that form on your website, or can we just email each other? malin @ webbmalin.se

Thanks,
Malin

Statistics: Posted by webbmalin — December 19th, 2011, 8:38 am


]]>
2011-12-12T13:33:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56385#p56385 <![CDATA[Re: List childpages only if custom capability is paid for]]> Statistics: Posted by Bruce C — December 12th, 2011, 1:33 pm


]]>
2011-12-12T13:29:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56384#p56384 <![CDATA[Re: List childpages only if custom capability is paid for]]> I don't really know php and stuff, only html and learned some wordpress functions that I reuse,,,, but I guess you could tell :)

If you come up with a code that works, you're an angel !!!

Statistics: Posted by webbmalin — December 12th, 2011, 1:29 pm


]]>
2011-12-12T13:15:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56382#p56382 <![CDATA[Re: List childpages only if custom capability is paid for]]>
You'd probably have to run a loop through the get_post_meta function to check for the s2member entry, and check to see what custom capabilities is has. I'm not sure how to do it by just talking about it, but I can probably write a code to do this.

Statistics: Posted by Bruce C — December 12th, 2011, 1:15 pm


]]>
2011-12-12T12:11:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56378#p56378 <![CDATA[Re: List childpages only if custom capability is paid for]]>
But I do NOT want to write the cc in the code. (kurs is the post type btw, the cc is called "medierna")
I need it to work even if my client adds more custom capablities...

I mean I can show child pages for current page even without writing the page ID... should be possible to show current (or accessable) custom capabilities without writing the name of it... or am I totally out of it ??? :)

Statistics: Posted by webbmalin — December 12th, 2011, 12:11 pm


]]>
2011-12-12T11:53:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56373#p56373 <![CDATA[Re: List childpages only if custom capability is paid for]]>
Code:
<?php
if (current_user_can('access_s2member_ccap_kurs'))
{
//This is where the widget goes
}
?>

Statistics: Posted by Bruce C — December 12th, 2011, 11:53 am


]]>
2011-12-12T11:51:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56372#p56372 <![CDATA[Re: List childpages only if custom capability is paid for]]> viewtopic.php?p=56366#p56366

Bruce C shows conditionals but for Custom Capabilites.

Hope this helps. :)

Statistics: Posted by Eduan — December 12th, 2011, 11:51 am


]]>
2011-12-12T11:47:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16310&p=56370#p56370 <![CDATA[List childpages only if custom capability is paid for]]> I promise that once my website is done and I'm more experienced I will help others too.

So, I have a custom post type called "kurs". (translates to class)

Every Parent kurs is visible for everybody, this is where the buy button will be.
The kurs will have childpages that are restricted to s2member Level 1 and also a custom capability.

I list the childpages in the sidebar.

I managed to show this sidebar only if you are logged in... BUT...
I want this sidebar (or the childpages) to only be visible if you paid for this custom capability...

And I don't want to write the name of the custom capability in the code, it shouldn't matter what cc is used.

I figured, maybe I should use "is_permitted_by_s2member" in some way, but I couldn't get it to work...

Can anyone help me with this one? :?

Thanks
/Malin

Statistics: Posted by webbmalin — December 12th, 2011, 11:47 am


]]>