How to add an entry to the Page/Post Settings Sidebar? [duplicate]
This question has already been posted and answered: Follow Get a Sidebar up and Running from the WordPress doc, but use PluginDocumentSettingPanel instead of PluginSidebar.
This question has already been posted and answered: Follow Get a Sidebar up and Running from the WordPress doc, but use PluginDocumentSettingPanel instead of PluginSidebar.
Try doing global $paged before using the variable in the widget function.
You probably want to define a size for post thumbnails for this side-bar area first. This needs to be registered with your theme so you can refer to it later one. Then you can make use of the get_the_post_thumbnail() function passing the ID of the post as well as your post thumbnail size name as … Read more
Use three sidebars an let them float. Anything else will break depending on the widgets your users insert.
I found this on the codex You can only use conditional query tags on or after the init action hook in WordPress. For themes, this means the conditional tag will never work properly if you are using it in the body of functions.php, i.e. outside of a function. update you don’t need to hook the … Read more
you can use Query Posts plugin which creates a widget that you can place on that sidebar, and select what to display. if you are looking to code your own the its a you are sure that you wont remove it from that side bar you can create a simple custom WP_query to selset your … Read more
take a look at Sidebar Generator it lets you specify a sidebar on a per-page/per-post basis. some of its main features are: Generate unlimited sidebars pick a sidebar on a per-page and per-post basis unique CSS classes for each sidebar for customizable looks
you could use custom post types to keep them separate. or check in_category in single.php and load additional templates: if( in_category(‘country1’) ) include (TEMPLATEPATH . ‘/single-country1.php’); elseif( in_category(‘country2’) ) include (TEMPLATEPATH . ‘/single-country2.php’);
I think the problem is that you’re calling get_post() (note: singular) instead of get_posts() (note: plural). EDIT Other problems: The get_posts() function uses the category array key, rather than category_name. The category array key expects category ID, rather than category slug. You’re not wrapping your looped list items (<li>…</li>) properly (i.e. within <ul></ul> tags)
I would consider the following … Register a new sidebar: function your_new_widget() { register_sidebar( array( ‘name’ => __( ‘Single View Sidebar’, ‘your_textdomain’ ), ‘id’ => ‘sidebar-single’, ‘description’ => __( ‘This widget area is found only on the single post view.’, ‘your_textdomain’ ), ) ); } add_action( ‘widgets_init’, ‘your_new_widget’ ); Create a new sidebar template: /** … Read more