Sidebar not show customizer!
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?
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?
You can add a filter to page_link to modify link output: function wpd_add_fragment_to_pages( $url ) { return $url . ‘#navbar’; } add_filter( ‘page_link’, ‘wpd_add_fragment_to_pages’ );
You are using a deprecated way to declare widgets. WordPress is anticipating on constructor being deprecated in PHP 7.0, in favour of __construct. Please refer to the Widgets API to see how widgets are constructed these days. If the GFWidget you mention is generated by a plugin that plugin is very much outdated and probably … Read more
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.
The reason for this is that the widget will run its update logic on keydown and also on change for a given input element. See https://github.com/WordPress/wordpress-develop/blob/4.7.2/src/wp-admin/js/customize-widgets.js#L891-L907 There are some tradeoffs made when widgets were added to the customizer to bring these PHP-driven interfaces into a JS-driven context. It wasn’t perfect and so this is part … Read more
(Updated based on comments below.) <div class=”menu-menu-1-container”> is coming from WP’s default menu container. You can customize what tag is used (div, ul, etc.) or tell WP not to use a container at all, as well as set the ID and/or class (menu-menu-1-container, etc.) by using the container, container_class and container_id arguments when you call … Read more
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’]; } ?>