Tag Info

New answers tagged

-1

I'm a noob. I named the Taxonomy wrong... It's post_format not post-format


1

It's in your theme or setup as a sidebar on the Widgets page.


0

Best tricks for sidebars at woocommerce, with incompatible themes. If you can’t see the sidebar of your theme when using woocommerce and the sidebar is not showing correctly, just see the name of sidebar at your theme’s folder. For example: if the sidebar name is sidebar-left.php, sidebar-right.php or anything else, depending on where do you want to show ...


1

Ok, finally the support team answered my question, and if even if there's not a real solution, suggested a workaround. Since the answer is buried deep in the vendor user forum - link here - I'm sharing the solution here, just in case someone has the same problem with this or another theme. Basically it's a bug in the parent theme (Toolset Bootstrap), that ...


0

First of all, thanks to @toscho for the detailed answer. This is a simple example for those who are searching for a simple solution and default widget options: $active_sidebars = get_option( 'sidebars_widgets' ); //get all sidebars and widgets $widget_options = get_option( 'widget_name-1' ); $widget_options[1] = array( 'option1' => 'value', 'option2' ...


1

This seems to test properly for me. function register_home_sidebar() { /* Register the new sidebar. */ register_sidebar( array( 'id' => 'home-sidebar', 'name' => __('Home Sidebar'), 'description' => __( 'This sidebar will display only on the homepage.'), 'before_widget' => '<aside id="%1$s" class="widget ...


2

There isn't a standard way to do it AFAIK in the form() method; here's a function to do it: function wp158055_get_sidebar_id( $widget ) { foreach ( wp_get_sidebars_widgets() as $sidebar_id => $widget_ids ) { if ( array_search( $widget->id, $widget_ids ) !== false ) return $sidebar_id; } return false; } And call with $this. Note ...


1

You can include the search form in your 404.php file using the get_search_form() function. Using get_sidebar( '404' ); would look for a file called sidebar-404.php and fall back on sidebar.php if needed. get_sidebar()


0

Go to Dashboard -> Appearance -> Widgets. You are looking for Archives widget. If your theme has built in sidebar, you'd just select the appropriate widget in that sidebar. To create a new sidebar in your theme, you need to use register_sidebar() in your theme's functions.php. To include a sidebar in your file, you'd use get_sidebar() in your ...


0

The sidebar is created in two different places: The black strip is created from .site:before, check line 3910 of style.css #secondary actually displays the sidebar information, check line 3923 of style.css .featured-content, .site-content, .site-main .widecolumn provide left padding to the content area should you wish to dispose of that too.


0

Remove: 'no_found_rows' => true, from your WP_Query call inside the widget code. Additionally I would suggest to make this change : 'base' => add_query_arg( 'latest_page', '%#%' ), in your paginate_links call, because add_query_arg() will handle if ? or & is used. This should make the pagination work in your widget. Note: I'm almost, ...


0

First you will replace this line <div id="%1$s" class="widget %2$s" data-custom-title=""> with <div id="%1$s" class="widget %2$s" data-custom-title="DCT"> Now add the filter in your functions.php file. add_filter( 'widget_display_callback', 'add_custom_data_to_before_widget', 10, 3 ); function add_custom_data_to_before_widget( $instance, ...


-1

You want to use a not (!) in your conditional. if (!is_active_sidebar('NameOfSidebar')){ // Must not display the section title. } else { // Display the sidebar here. } The first condition will return true if is_active_sidebar() returns false. is_active_sidebar() returns false if that sidebar has no active widgets saved to it.


0

Try is_active_sidebar if ( is_active_sidebar('your-sidebar-i.d')) Where your-sidebar-i.d equals the I.D you use when you register the sidebar.


1

There is, in fact! The global variable $wp_registered_sidebars stores the registered sidebars, and $wp_registered_widgets stores all registered widgets (by widget ID).


0

This question has been answered many times already on this site. There's 2 simple steps: One: Add to functions file register_sidebar( array( 'name' => __( 'Your Sidebar' ), 'id' => 'wpsites-sidebar', 'description' => __( 'Your Sidebar Description.' ), 'before_title' => '<h1>', 'after_title' => ...



Top 50 recent answers are included