-
AuthorPosts
-
June 1, 2015 at 11:56 am #452482
Hello dear support team,
I want to remove certain Shortcode Elements for my client’s blog.
I don’t want to confuse the authors so I want to display only the shortcodes I have adapted to their design.For example I want to disable/hide the ‘av_dropcap1’ and ‘av_dropcap2’.
How is it possible to deactivate these on both editors. Most important in the post’s default editor where the Magic Wand is displayed.Thanks in advance for your help!
- This topic was modified 9 years, 5 months ago by jensvolker.
June 2, 2015 at 5:52 pm #453261Hey jensvolker!
Please go to enfold/config-templatebuilder/avia-shortcodes and remove those elements.
Cheers!
YigitJune 3, 2015 at 9:15 am #453640Thanks for that hint Yigit,
but can i as well deactivate it in the child themes function through a script snippet?
Would prefer that so we would be able to update without effort. We have changed a lot on our first enfold blog so I want to avoid running into that update problems again.Thanks for your great support :)
June 3, 2015 at 10:33 pm #454117Hi Yigit, I’d like to know the answer to this as well.
Also, is it possible to remove elements by user role (eg, hide certain elements in the layout builder for Editors, but show them for Admins)
Thanks
DuncJune 4, 2015 at 5:50 pm #454637Hey!
As for changing them depending on the user it’s possible but I don’t think it would be feasible to do it in a child theme though. Not unless you were wanting to hide them with CSS. In that case you could try something like this.
add_action( 'admin_print_styles', 'enfold_customization_admin_css' ); function enfold_customization_admin_css() { echo '<style type = "text/css">'; echo '#mceu_63 { display: none; }'; echo 'a[href="#avia_sc_button"] { display: none; }'; echo '</style>'; }
That code would hide the button shortcode in the layout builder and in the magic wand icon. If you wanted to hide it only for certain users then you could try using the “current_user_can” conditional, https://codex.wordpress.org/Function_Reference/current_user_can, to check if the user has certain capabilities.
Regards,
Elliott- This reply was modified 9 years, 2 months ago by Elliott.
June 15, 2015 at 2:03 pm #459295Thank you for your help, we already have added several shortcodes with
the setup described in your link but now the task would be to remove certain ones …I will definitely not be able to hide the magic wand icons via CSS. Because I have tried it already and :
I experienced that the magic wand icons do not have a unique ID like #mceu_63 … the same shortcode menue item will have a different IDs on different posts.Therefore i will have to remove it via PHP … any ideas?
- This reply was modified 9 years, 5 months ago by jensvolker.
June 16, 2015 at 4:36 pm #460136Hi!
actually I think the magic wand icon does have a unique ID: #mceu_15
and using Elliott’s php code you will achieve what you want I think.Best regards,
AndyJuly 27, 2015 at 5:13 pm #479179Hello,
after several research, i found this post.
I try to basically doing the same thing : hide boutton in the admin bar when you write a page.
This code works perfectly for hidding the “button” widget.
add_action( 'admin_print_styles', 'enfold_customization_admin' ); function enfold_customization_admin() { echo '<style type = "text/css">'; echo '#mceu_63 { display: none; }'; echo 'a[href="#avia_sc_button"] { display: none; }'; echo '</style>'; }
But I can’t find out where is the list of unique ID. There is one ?
When i add this, nothing else hidding.
add_action( 'admin_print_styles', 'enfold_customization_admin' ); function enfold_customization_admin() { echo '<style type = "text/css">'; echo '#mceu_63 { display: none; }'; echo '#mceu_64 { display: none; }'; echo 'a[href="#avia_sc_button"] { display: none; }'; echo 'a[href="#shortcode_insert_button"] { display: none; }'; echo '</style>'; }
So i want to know where i can find the unique ID list and hidde other button in the admin bar.
Regards,
Loïc- This reply was modified 9 years, 2 months ago by Elliott.
July 29, 2015 at 2:36 pm #480244Hi!
You’ll just have to right click and view the page source to see the IDs. What elements are you trying to hide?
Regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.