Correct way to add a block element to sidebar layout
You should simply add the html block to the built in text widget. And as for positioning it above the menu just use the drag n’ drop functionality of the sidebar widgets.
You should simply add the html block to the built in text widget. And as for positioning it above the menu just use the drag n’ drop functionality of the sidebar widgets.
If you want to change the orders, you can use the filter sidebars_widgets, the argument to which is an array of all the widget ids and their locations. You can change the id positions in that array as per your need.
You may already know this, but you need to specify the widget’s class name as the $widget_name variable in the template tag. For example, Depending on the widget, you may also need to add parameters to the_widget() to get it to display properly — see notes on thewidget() $instance and $args in the codex. http://codex.wordpress.org/Function_Reference/the_widget … Read more
you have a $ undefined js error on line 191. wp_enqueue_script has a dependencies parameter, I think you need to pass the jquery-ui handle as a dependency with your accordion script so it loads first.
you can use this, <?php if( is_front_page() ):?> <div class=”home-page-menu”> wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); </div> <?php elseif; ?> <div class=”inside-page-menu”> wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); </div> <?php endif; ?> Here, you should be change your CSS style for home-page-menu and inside-page-menu . for more … Read more
There are plugins that can do this like Widget Context or Widget Logic. If you want your own solution then it’s pretty easy: hook your function with the checkbox on in_widget_form hook your widget update function widget_update_callback (update the widget option) check if the option was checked using the widget_display_callback hook (return false if it … Read more
Write before <?php get_footer(); ?> <?php get_sidebar(); ?> or <?php get_sidebar( $your_custom_sidebar ); ?>
This may help… http://www.kimwoodbridge.com/how-to-exclude-a-category-from-the-sidebar-list-in-wordpress/
You could create your own widget that queries posts from a certain category then displays the_post_thumbnail in an unordered list linking to the post. Example widget (add to functions.php): <?php class c3m_thumbnail_posts extends WP_Widget { function c3m_thumbnail_posts() { $widget_ops = array( ‘classname’ => ‘thumbnail-posts’, ‘description’ => ‘Displays post thumbnails’ ); $control_ops = array( ‘id_base’ => … Read more
I have answered this myself by adding an options page and adding options to the database. The functions are add_option(‘yourpluginoption1′,’value’); add_option(‘yourpluginoption2′,’value’); add_action(‘admin_menu’, ‘yourplugin_menu_’); function yourplugin_menu_() { add_options_page(‘etc etc…