Hide theme option from non-admin users

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Hide theme option from non-admin users

Postby suffusionner » 11 Sep 2012, 21:25

Hello,

I'd like to hide the theme option from users, but I don't see how! I tried some plugins but additional options are still there!
This is just to avoid non-admins play with theme options.

Any idea?
Thanks
suffusionner
 
Posts: 41
Joined: 06 Aug 2012, 14:09

Re: Hide theme option from non-admin users

Postby drake » 11 Sep 2012, 22:54

If you start to using a child theme with the starter kit provided by Sayontan: http://aquoid.com/news/2012/02/suffu-sc ... suffusion/ you will find in functions.php of the child theme the filter you need.
drake
 
Posts: 5650
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Hide theme option from non-admin users

Postby suffusionner » 12 Sep 2012, 07:30

Hi Drake,

I downloaded the child theme and found descriptions of what we can do but it doesn't said how we can do it!
There is:
Code: Select all
function suffu_scion_theme_setup() {
   // If you want to disable the "Additional Options for Suffusion" box:
   // remove_theme_support('suffusion-additional-options');


This exactly what I want to do but how?
This is the question...

Thank you very much if you have any guideline.
suffusionner
 
Posts: 41
Joined: 06 Aug 2012, 14:09

Re: Hide theme option from non-admin users

Postby drake » 12 Sep 2012, 07:39

suffusionner wrote:I downloaded the child theme and found descriptions of what we can do but it doesn't said how we can do it!


By paying someone who knows WordPress? :lol: :lol: :lol:

It's simple, just un-comment the filter (delete the backslashes before remove_theme_support). Your new function will look:
Code: Select all
function suffu_scion_theme_setup() {
   // If you want to disable the "Additional Options for Suffusion" box:
   remove_theme_support('suffusion-additional-options');


Save

Don't make any other change, don't press space or enter key when you are in the file.

(tonight I will try to make some time for replying to your question about the pages/categories/menu)
drake
 
Posts: 5650
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Hide theme option from non-admin users

Postby suffusionner » 12 Sep 2012, 08:38

drake wrote:

By paying someone who knows WordPress? :lol: :lol: :lol:

:)
If suffusion makes me a rich man, I'll remind of you, be sure :) !
drake wrote:It's simple, just un-comment the filter (delete the backslashes before remove_theme_support). Your new function will look:
Code: Select all
function suffu_scion_theme_setup() {
   // If you want to disable the "Additional Options for Suffusion" box:
   remove_theme_support('suffusion-additional-options');


Save

Don't make any other change, don't press space or enter key when you are in the file.

Cool! but this removed it from all accounts, including admin account!
I just would like to remove it only for non-admin, not for admin.

drake wrote:
(tonight I will try to make some time for replying to your question about the pages/categories/menu)

I appreciate your help, Drake. You are the king of Suffusion :) !
suffusionner
 
Posts: 41
Joined: 06 Aug 2012, 14:09

Re: Hide theme option from non-admin users

Postby drake » 12 Sep 2012, 09:29

In functions.php change the whole block edited above with this one:

Code: Select all
function suffu_scion_theme_setup() {
   // If you want to disable the "Additional Options for Suffusion" box:
if( !current_user_can('administrator') ) {
    // true if user is not admin
   remove_theme_support('suffusion-additional-options');
}
drake
 
Posts: 5650
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Hide theme option from non-admin users

Postby suffusionner » 12 Sep 2012, 14:12

Thanks Drake,
This didn' work, unfortunately.
Well, if leave it removed from admin account, will this affect SEO?

Thanks
suffusionner
 
Posts: 41
Joined: 06 Aug 2012, 14:09

Re: Hide theme option from non-admin users

Postby drake » 12 Sep 2012, 20:04

How can affect the backend of your site SEO? If I visit your site I can see only the frontend. Crawlers will see only the frontend too and this is the natural behavior.

But for sure you made some mistake when you add the code. It works for sure, I tested this on one of my sites.
drake
 
Posts: 5650
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Hide theme option from non-admin users

Postby suffusionner » 13 Sep 2012, 19:25

Thanks Drake.
Actually, I meant that given the additional options offer the possibility to provide SEO terms (to improve SEO), if I remove this option from Suffusion, will this affect the SEO performance?
This was my wondering.
suffusionner
 
Posts: 41
Joined: 06 Aug 2012, 14:09

Re: Hide theme option from non-admin users

Postby drake » 13 Sep 2012, 19:46

Only for SEO you can install All in One SEO Pack.
drake
 
Posts: 5650
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania


Return to Support Requests

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests