[Theme: Twenty Fourteen Child] Functions.php behaviour localhost vs server
-
Hi
My client wants to be able to update her site exclusively from a mobile/cell phone – she has no computer.
I’m looking to simplify the dashboard for her so she can readily view/edit the Content Sidebar without having to scroll down past the Available/Inactive Widgets – the (responsive) Content Sidebar moves below them on a small screen. (I know I could direct her to contract these by tapping the “up” arrow next to them – but I want to minimalise the actions she needs to undertake.)
In my Child Theme’s functions.php file, I’ve added the following:
// unregister all widgets function unregister_default_widgets() { unregister_widget('WP_Widget_Pages'); unregister_widget('WP_Widget_Calendar'); unregister_widget('WP_Widget_Archives'); unregister_widget('WP_Widget_Links'); unregister_widget('WP_Widget_Meta'); unregister_widget('WP_Widget_Search'); unregister_widget('WP_Widget_Text'); unregister_widget('WP_Widget_Categories'); unregister_widget('WP_Widget_Recent_Posts'); unregister_widget('WP_Widget_Recent_Comments'); unregister_widget('WP_Widget_RSS'); unregister_widget('WP_Widget_Tag_Cloud'); unregister_widget('WP_Nav_Menu_Widget'); unregister_widget('Twenty_Fourteen_Ephemera_Widget'); } add_action('widgets_init', 'unregister_default_widgets', 11);…to unregister all widgets except the Black Studio TinyMCE Widget – “Visual Editor”, which she will use in the Content Sidebar. (NB. Can anybody tell me the relevance of the figure “11” as the final parameter of “add_action” – I’ve googled it without success…)
This works fine when I run it locally with localhost (using XAMMP v3.2.1) – none of the other widgets are displayed. However; when I upload the functions.php file to the Child Theme directory on the server, all the other widgets are still displayed. Other functions in my Child Theme (e.g., Custom Admin Login Header Logo, Hide Error Messages, etc.) are working fine both on localhost and server, and so I don’t believe there’s anything wrong with the coding itself.
I’m really perplexed by this – anybody got any ideas? All assistance greatly received!
Cheers
Webbo
The topic ‘[Theme: Twenty Fourteen Child] Functions.php behaviour localhost vs server’ is closed to new replies.