Disabling theme editor in admin disables responsive visibility
-
Topic
-
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.
Tagged: hide on mobile, jump start 2, responsive, theme editor
If I disable theme editor (among other pages) in child functions.php like below it breaks the resposive visibility check box funtions.
/* =Remove Admin Menu and Submenu Items --------------------------------------------------------------------- */ add_action( 'admin_menu', 'my_remove_menus', 999 ); function my_remove_menus() { remove_menu_page( 'link-manager.php' ); remove_submenu_page( 'themes.php', 'themes.php' ); remove_submenu_page( 'themes.php', 'jumpstart-base' ); remove_submenu_page( 'themes.php', 'theme-editor.php' ); }
So when I have a Simple Slider (full width) on my home page and check “Hide on mobile devices” it doesn’t work. If I enable the theme-editor.php again responsive visibility works fine.
That can’t be right – right?
I’m not really sure how those things could have anything to do with each other? Are you sure it’s not something else? And what do you mean it breaks the fundtionality? Like the checkbox doesn’t save? Or just doesnt work on frontend?
I mean that it doesn’t work on frontend after disabling theme editor. The disabled element still shows on mobile even if the “Hide on mobile devices” check box is ticked.
Instead of trying to think about any logic of how these items don’t make sense effecting each other, I did go ahead and just try and reproduce what you’re saying.
I pasted your code in your my functions.php, verified that the corresponding admin pages were indeed gone, and then selected “Hide on mobile devices” for an element in a custom layout. — But all worked as expected on my end when I view the layout. The element was indeed hidden. Hmm, sorry, but I guess I’m not sure what else?
The way these responsive utility classes work is fairly simple. Depending on the boxes you check, one of these classes gets added to the element so it can be hidden/shown with CSS. It would be the same functionality if you just put one of these classes into the “CSS Class” option of the element’s display options.
Do you have a live link to the layout where this option isn’t working?