WordPress Plugins won’t save
The most likely problem is that the theme is outdated and no longer compatible with some core WP functions, the theme was released in 2012 so it’s pretty old.
The most likely problem is that the theme is outdated and no longer compatible with some core WP functions, the theme was released in 2012 so it’s pretty old.
Despite what you say is_active_widget does work on custom widgets as well. You may just have trouble locating its ID. To help you, here’s a snippet that will show the ID of a widget on the widget admin. add_action(‘in_widget_form’, ‘wpse202950_get_widget_id’); function wpse202950_get_widget_id($widget_instance) { if ($widget_instance->number==”__i__”){ echo ‘<p class=”widget-id-message”>’ . __(‘Save the widget to get its … Read more
Here is a little code snippet to get you started. This will query through the most recent custom post types named “custom_post_type”. Change this value to the name of the custom post you wish to query. <?php $args = array( ‘post_type’ => ‘custom_post_type’, // <– make sure to use the name of your custom post … Read more
You have to put the function footer_sidebar() in the file functions.php not sidebar.php Is the footer.php included on site you opened the customizer?
WordPress admin is not designed to scale. If you are managing some resource which is 100x more than the average site, you need to be prepared to either develop your own solution to admin it or learn to live with it. In the case of widgets you should try the customizer or the accessibility mode … Read more
While you can look at the WidgetControl instances contained inside of a SidebarSection, it is better to instead to look at the underlying setting that lists out the widgets contained inside of the sidebar. So do something like this: wp.customize( ‘sidebars_widgets[sidebar-1]’, function( sidebarSetting ) { console.info( sidebarSetting.get().length ); } ); Alternatively, with a reusable function: … Read more
Try to include your inline script at the bottom of your snipper.js file, and then enqueue it using wp_enqueue_scripts(): function my_chat_script() { wp_enqueue_script( ‘chat-js’, ‘URL OF SNIPPER HERE’, false ); } add_action( ‘wp_enqueue_scripts’, ‘my_chat_script’ ); This is the proper way to include scripts in your WordPress using functions.php file. However, if you insist on adding … Read more
You are using the right double quotation mark ” instead of the quotation mark “, use it like this: <a href=”http://www.somesite.com”>Some Site</a> they look very similar but are different chars.
You can get the widget name from the widget id with this: <?php global $wp_registered_widgets; $id = ‘recent-comments-1’; // example if ( isset($wp_registered_widgets[$id][‘name’]) ) { echo $wp_registered_widgets[$id][‘name’]; } ?>
In order to interact with the event “widget-added” , you should enqueue your JavaScript file using “customize_controls_enqueue_scripts” to avoid it being part of the repetitively loading preview iframe ( where $(document) is different from the parent page document). I was able of interacting with the “widget-added” event using this example : in theme’s functions.php function … Read more