Add class from custom field into widget class
Add class from custom field into widget class
Add class from custom field into widget class
Inkness theme sidebar
is_admin() returns true if you’re doing an Ajax request. So this is why my code didn’t work. Instead I’ve done this: add_filter( ‘loop_start’, ‘my_sidebar_widget’, 25 ); function my_sidebar_widget() { if ( is_active_sidebar( ‘my_sidebar’ ) && (defined( ‘DOING_AJAX’ ) && DOING_AJAX ) || !is_admin() ) { echo ‘<div id=”my_sidebar”>’; dynamic_sidebar(‘my_sidebar’); echo ‘</div>’; } } defined( ‘DOING_AJAX’ … Read more
The following plugin or his modification might be the solution for you. Automatically adds menu items by category. However, the first item must be added manually, and then you must click to automatically add subcategories in the menu item. If I know correctly, it only adds categories. No blog posts or pages. Plugin: Add Descendants … Read more
The Custom Post Types are probably set up with the Plugin “Types – Complete Solution for Custom Fields and Types” that is missing on the second install. According to their docs this plugin has an export/import feature. You can use it to export in the old install and then import the Custom Post Types in … Read more
If what you want is “to break up a sidebar over three containers”, then you don’t really need to rebuild dynamic_sidebar() to do it. There is a filter called dynamic_sidebar_params that can be leveraged to break up the sidebar. function add_closing($params) { $params[0][‘after_widget’] = $params[0][‘after_widget’].'</div><!– close wrapper-thing –>’; return $params; } add_filter( ‘dynamic_sidebar_params’, function ($params) … Read more
I don’t know any themes that would do that, but you could create a widget that displays different content according to the time or date. I’m not sure if this is the right way to do this, but what I would do: Use a plugin that creates widgets as a custom post type, like Custom … Read more
EDIT: Here I have registered 2 sidebars in functions.php with names sidebar1 and sidebar2. $sidebar_args = array( ‘name’ => __( ‘sidebar1’, ‘theme_text_domain’ ), ‘id’ => ‘sidebar-1’, ‘description’ => ”, ‘class’ => ”, ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</li>’, ‘before_title’ => ‘<h2 class=”widgettitle”>’, ‘after_title’ => ‘</h2>’ ); register_sidebar( $sidebar_args ); $sidebar_args_2 = array( … Read more
More than one dynamic sidebar
wp_register_sidebar_widget in loop within a plugin?