Load same sidebar multiple times
You can’t. get_template() function has a protection against this. You will have to use include().
You can’t. get_template() function has a protection against this. You will have to use include().
In your functions.php file try register sidebar without putting in function like this register_sidebar(array( //try not to enclose this in function ‘id’ => ‘primary’, ‘name’ => ‘Primary Sidebar’, ‘description’ => ‘A short description of the sidebar.’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h3 class=”widget-title”>’, ‘after_title’ => ‘</h3>’, )); And make … Read more
you are missing any form off styling for your columns woof does not add column styling it relies on your theme and in your css you have no stylings for columns
The tags used for the headings would be set wherever the sidebars are registered. Look for register_sidebar() in the theme’s functions.php file (or a file that has been included into the functions file). It will look like this (example from here): register_sidebar( array( ‘name’ => __( ‘Main Sidebar’, ‘textdomain’ ), ‘id’ => ‘sidebar-1’, ‘description’ => … Read more
Have you tried the options suggested in this WordPress Support thread? They range from copying the generated code in a Text Widget to parsing the shortcode yourself in your template (<?php echo do_shortcode(‘[contact-form 1 “Contact form 1”]’); ?>).
You need to implement your Widget using the Widgets API, so that WordPress knows how to make multiple instances of the Widget. Your Widget declaration should take the following format: class My_Widget extends WP_Widget { function My_Widget() { // widget actual processes } function form($instance) { // outputs the options form on admin } function … Read more
check your sidebar.php and functions.php of the theme, the sidebar define the markup outside the widget; the function register_sidebar() defines the markup before content of the widgets; this markup you must change. See the codex for this function: codex register_sidebar() Edit Specifically, you need to look at the before_widget and after_widget parameters of the register_sidebar() … Read more
You can get the Post Thumbnail by get_the_post_thumbnail( ). Inside your widget add the following code: global $post; if ( has_post_thumbnail( $post->ID ) ) echo get_the_post_thumbnail( $post->ID, ‘your-image-size’ ); If there is a Featured Image, it will be shown.
To quote the Codex The return value should be used to determine whether to display a static sidebar. This ensures that your theme will look good even when the Widgets plug-in is not active. So essentially you can use is to display other content if the user has not activated any widgets in the sidebar.
There actually are filters coming with WP 3.9+: do_action( ‘dynamic_sidebar_before’, $index, false ); do_action( ‘dynamic_sidebar_after’, $index, false ); apply_filters( ‘dynamic_sidebar_has_widgets’, false, $index ); The 2nd argument indicates if the sidebar has widgets. Current workaround: Hook into sanitize_title() as this will hold the current sidebar name/ID. Then hook into wp_get_sidebars_widgets() as this is where you already … Read more