Page 1 of 1

Restrict a text from all the posts

PostPosted: February 4th, 2012, 11:08 am
by cristiandark
Hi there, i want to know if is possible to hide a text from the blog, and to be only avanible to premium users.

Example: I want to hide "Download" text, the "Download" text will contain a url to the a file. I've tryed with URI but is not working. If download text have the url to http://85.25.000.00/download/february/test-file.mp3 i puttet on URI /download/ also /download, /february/ , etc. And is still visible.

So is there any solution to hide Download from guest, and to be avanible only to Leve 4 users? And also to be done automatically, without addig [private][/private] and things like that. Sorry for my bad english :)

Re: Restrict a text from all the posts

PostPosted: February 4th, 2012, 11:15 am
by Eduan
You could try s2Member conditionals, you can find the shortcode versions under WP Admin -> s2Member -> API / Scripting -> Simple/Shortcode Conditionals.

You can find the PHP versions under WP Admin -> s2Member -> API / Scripting -> Advanced/PHP Conditionals. For these you will need the Exec-PHP plugin or any other WordPress plugin that allows you to insert PHP into posts/pages.

Hope this helps. :)

Re: Restrict a text from all the posts

PostPosted: February 4th, 2012, 11:21 am
by cristiandark
Hi there, i don't have the necessary skills to do that, if you can do that, i'm ready to pay:P

Re: Restrict a text from all the posts

PostPosted: February 4th, 2012, 11:36 am
by Eduan
You don't need to pay me.

I'm gonna give you some examples so that you can use them:
The following code will show you where to put the level 4 content:
Code: Select all
[s2If current_user_is(s2member_level4)]
    Some premium content for Level 4 Members only. This is where the download link will go.
[/s2If]
This code will only show the download link to level 4 members. You can modify the number on top to protect content on different levels.

Hope this is understandable. :)

Re: Restrict a text from all the posts

PostPosted: February 4th, 2012, 11:46 am
by cristiandark
I don't have any idea how it works, that code it has to be present in all the posts? becouse i want that the "Download" text to be hidden default, without adding codes, etc in the post. I hope you understand what i need