Hey,
You can unhook items from being in the customizer. the majority of theme options are in the page (appearance > theme options) which you need to make sure you have the virtue toolkit installed to get access to.
What items are you wanting to remove?
Kadence Themes
Hi. Now that i´ve activated the Virtue Toolkit i can see that some of the things you can control from the Theme Options are not present in the WP Customizer when this plugin is inactive. So, my questions are:
1 – is it possible to decide what will be present in Theme Options and in the Customizer using the child theme functions.php?
2 – Let´s say i want Home Layout not to be visible for the client. How can i do it without touching the functions.php of the parent theme?
3 – And if i want to add some other options using only the functions.php file of the child theme, is this possible?
Thank you.
1. Sure. Tell me what your thinking there are action hooks for this.
2. If you want to hide items from a client thats different then just hiding items in general I suggest just making the client an editor so they don’t have access to the options. You can’t pick and choose in the the options what would be visible on a user by user basis.
3. Yes, The whole options panel is built using redux framework so you can use there API to hook in more options.
Kadence Themes
Thank you for your answer.
Actually, my 2nd questions was, more or less, the continuation of the first one. My idea, to give you 3 specific examples, is this:
1 – how can i hide Home Layout (or any other section/item) in Theme Options and Customizer for any client, regarding of their role?
2 – how can i add other sections/items to Theme Options?
3 – how can i add other sections/items to Customizer?
If all of the 3 questions are possible to solve using the code examples of the Redux Framework docs, how do i manage this without touching the functions.php of the parent theme and working exclusively with child themes?
Thank you once more.
1. You can’t really. WordPress is designed to show that based on role.
You might try looking at a plugin like this: https://ww.wp.xz.cn/plugins/user-role-editor/
I would guess if you really wanted to target the clients user id then you could run filters for hiding all this but I really don’t suggest going that route. Thats a lot of hacking for what wordpress user roles already does for you.
2 and 3 are the same you can add sections those will always show in theme options and in settings of that section you can choose if you want in customizer.
Of course you can add sections just to customizer using the wordpress api and that would have nothing to do with the theme but all the code is there to use the customizer because of wordpress: https://codex.ww.wp.xz.cn/Theme_Customization_API
4. You don’t ever need to work in the parent theme, redux api has all the hooks for adding and adjusting in your child theme functions: https://docs.reduxframework.com/core/redux-api/
Kadence themes