The sidebar tag has no wiki summary.
14
votes
2answers
2k views
Programmatically add widgets to sidebars
I would like to programmatically add widgets to my two sidebars that I've got. I couldn't find any official way of doing it?
I started looking in the database. I've found that it's the ...
9
votes
4answers
2k views
Limit number of Widgets in Sidebars
If I use a custom widgetized area (for example footer) where there is only a limited number of spots for widgets (by design), can I limit the number of widgets the user may include in that specific ...
8
votes
3answers
2k views
Custom Post Type Data in Sidebar widgets?
(note: this question was originally about Custom Fields, but @MikeSchinkel had a better solution involving Custom Post Types)
On my site I have several pages which I want to show the same data in the ...
7
votes
3answers
5k views
Loading scripts only if a particular shortcode or widget is present
I needed a way to filter a page/posts content before it was loaded so I could add scripts to the header if a specific shortcode was present. After much searching I came across this on ...
6
votes
2answers
2k views
List all sidebar names?
I'm listing all sidebars like that:
global $wp_registered_sidebars;
echo '<pre>';
print_r($wp_registered_sidebars);
echo '</pre>'
So I'm getting something like:
Array
(
...
6
votes
7answers
337 views
Individual Widgets per Page
In my (page-only, no posts) Wordpress site I have a number of static blobs in need to put in a sidebar. We could call/tream thoses 'blobs' as widgets. At least they'll have a fixed html content, like ...
6
votes
3answers
1k views
How Do I Add Custom CSS To Only Certain Widgets
I have a standard dynamic sidebar using register_sidebar and dynamic_sidebar and I need the last widget in the sidebar (which will not have a set number of widgets) to have a distinct class ...
5
votes
5answers
5k views
How to Show Different Sidebars on Specific Pages?
I'm making a blog where only on specific pages I want to show different sidebar, I will add some widgets to those sidebar, which I don't want to show in default sidebar.
I've found a coding method to ...
5
votes
1answer
82 views
Display Random Author with Details in Sidebar
PHP newbie here, recently decided to have a stab at cobbling together a kooky little 'Random Author Spotlight' feature into my current WordPress theme. I'm almost done, but I've hit something of a ...
5
votes
2answers
701 views
Add the sidebar/widget editor to the post edit screen?
There are (among others) two common ways of customizing the sidebar on an individual post:
Create a new sidebar for the post, using code or plugins like Custom sidebars, WP Custom Sidebar, Per Page ...
4
votes
5answers
2k views
Different widgets on different page templates?
If I have a couple of different Page templates, how would I show a different collection of sidebar widgets for each of these templates? I'm using the Starkers theme as a starting point.
4
votes
3answers
1k views
Limit widget to certain sidebar?
I have multiple "sidebars", but not all of them are the same size. Not all widgets fit in all sidebars (for example, I have a "footer sidebar" where the client can place custom widgets, but they are ...
4
votes
5answers
1k views
Sharing Dynamic Sidebars across Multisite Blogs
I'm trying to find away to retrive a dynamic sidebar from one blog and print it on another blog in the same install of Wordpress Multisite. I have tried
switch_to_blog($blog_id);
...
4
votes
1answer
908 views
Getting the Next and Previous Posts Titles in the Sidebar?
Let's assume that I have the following posts with the following titles:
PostA (is assigned to the 'category 1')
PostX (category 2)
PostB (category 1)
PostC (category 1)
PostD (category 1)
PostY ...
4
votes
2answers
522 views
Get sidebar parameters (before_widget, before_title, etc.) from within a widget
Is it possible to dynamically get sidebar parameters from within a widget? That is, I am trying to access the before_widget/after_widget/before_title/after_title/name parameters of the containing ...
4
votes
1answer
452 views
Video Embed in Sidebar Widget with Links to Others in Category
I am trying to re-create the sidebar widget found here: http://www.clinicalforensicpsychology.org/
The links below the shown video are linked to the post category "videos". I have tried most every ...
3
votes
2answers
2k views
Getting post-thumbnails from another WP site
I have two WordPress installations, one at http://inversekarma.in and the other at http://inversekarma.in/photos. The latter is a photoblog, and its theme uses the standard WP post thumbnails (EDIT: ...
3
votes
2answers
3k views
is_home() and is_single() Not Working as Expected with Custom Post Types?
(Moderators note: Was originally titled: "Custom post type problem?")
I'm having some problems with custom post types where everything is working great except for the sidebars.
Here is some code ...
3
votes
1answer
1k views
Get list of all registered sidebars
I am registering sidebars automatically for each category (a separate widget space per category). The technique I'm using is here.
In the admin side I have an options page where I need to display a ...
3
votes
4answers
3k views
Custom per-page sidebar widgets .. possible?
Let's say I'm doing a site about cars, and in the main content area of a Page (using a certain template), there are a few paragraphs about a particular car.
In the sidebar, are several standard ...
3
votes
1answer
420 views
Highlight custom widgets in the admin area?
I have created some custom widgets for my client to use, but I want to make them stand out amidst the fifteen or so standard widgets in the admin area. How can I do this?
I have solved this problem ...
3
votes
1answer
598 views
How to add author details in the post sidebar?
I would like to add author details in the sidebar instead of bottom of the post?
Can anyone tell me how to do that?
As of now i'm using like this in the loop
<?php $curauthor = ...
3
votes
1answer
400 views
Problems with the sidebar args and wp_list_bookmarks
I have run into an issue trying to use the sidebar args (before_widget,after widget,after_widget,before_widget) as theme style friendly parameters for the function wp_list_bookmarks, that is that the ...
3
votes
1answer
85 views
Determining a Widget Instance and Sidebar Location?
When using the filter:
add_filter('widget_display_callback', 'function_name');
function function_name($instance) {
/* Some Code */
return $instance;
}
Is it possible to determine the sidebar ...
3
votes
1answer
405 views
Manual display of widget
I currently have a widget that needs to be manually displayed on the front page. The rest of the pages it shows up in the widget sidebar, (this is accomplished with 'Widget Logic') but on the front ...
3
votes
1answer
736 views
Get the sidebar ID in which the current widget was dropped
How can I find out in which sidebar was a widget dropped? From inside that widget. More precisely from the form() function.
Can I automatically remove the widget if it's not added in the appropriate ...
3
votes
1answer
96 views
Sidebar Generator issue
I hope this doesn't come across as very dumb (to some extend it is, however), but I am having a hard time dealing with the Sidebar Generator. In the description it is stated that "Now supports themes ...
2
votes
2answers
210 views
Worpress twenty eleven sidebar on Pages
I am using 2011 theme, any how I managed to get sidebar on single.php pages by installing child theme,
But now I want sidebar on pages,
How do I get it?
2
votes
1answer
47 views
register sidebars
i registered my sidebars as follows:
$sidebars = array (
'sidebar-10' => 'Hoof Sidebar',
'sidebar-11' => 'Tuisbladsy area een',
'sidebar-12' ...
2
votes
1answer
41 views
Text snippets shared across posts
I'd like to add a "fast facts" section to a wordpress site - an area in the sidebar where snippets of text are rotated.
Where is the best place to store things like this? Widgets don't really allow ...
2
votes
2answers
182 views
How To Determine If A Filter Is Called In A Sidebar/Widget Context?
So I have a plugin that appends or prepends an enhanced author biography to the content of a page/post/custom post type.
It does this by hooking to either the_content or the_excerpt and ...
2
votes
2answers
517 views
customizing recent posts
Im working on my first wordpress blog and trying to avoid plugins if at all possible for a lot of what doesn't really need to have a plugin. I am slightly familiar with php ( I don't understand it but ...
2
votes
1answer
68 views
Adding content to sidebars
I am working on a three-column layout where all three columns will have differing content depending on the post/page in the main column.
How would I go about giving the ability to change and update ...
2
votes
2answers
2k views
Give Editor Access To Sidebar
I want to give the Editor Role access to editing the sidebar and it's contents. I have a text widget in there and in order to edit this text widget the user needs to be an admin - this sucks. How do I ...
2
votes
2answers
2k views
How to exclude parent category but show child categories?
I figured out how to exclude the current post from displaying in my single-post view sidebar, but now I want to exclude parent categories and display only children. Any ideas how to do this? Much ...
2
votes
3answers
300 views
wordpress widget textbox in the sidebar
I have a normal textbox widget that I am using in certain sidebars. The text widget generates a div within a ul. Is there anyway to make the widget generate another ul li instead?
...
2
votes
1answer
540 views
WordPress Widget multiple use
I created this widget using a simple example on WordPress Codex:
<?php
function widget_container_latest_posts() {
global $wpdb;
global $post;
...
2
votes
1answer
732 views
Getting an ordered list of tags - via wp_tag_cloud or not?
I'm trying to output an ordered list of the top five tags for my site into the sidebar.
At the moment, I'm using wp_tag_cloud like this to get it to output a nice <ul>:
...
2
votes
2answers
723 views
Override dynamic_sidebar() in plugin?
I'm writing a custom plugin that allows a particular page to have it's own sidebar with widgets. It works great so far, but what I'd like to do is generalize it more and allow the plugin to ...
2
votes
3answers
7k views
Which tabs widget plugin for wordpress is better?
I see there are a lot of plugins to create tabbed widget in side-bar:
Fun with tabs
Post 2 tabs
Hybrid Tabs
Wordpress Tabs Slides
AmR Tab Menu Navigation
Tabbed Widgets
Which one is the best in ...
2
votes
1answer
210 views
How to generate and display widgets areas dynamically?
I want display different content in sidebar for every category, but as I create new ones I have to create the area for it. How can I have widget areas for every category and also display them on theme ...
2
votes
1answer
336 views
Best practices: Custom theme sidebar menu - hardcode or widget?
Is it best to hardcode a sidebar menu using functions.php or sidebar.php OR use the custom menu widget? Are there times when each is appropriate?
2
votes
2answers
138 views
Dynamic content in a widget
I have to make a widget from where the user will be able to add a few images and then I will show only some of them, randomly, and it will be automatically changed on page refresh. The problem is that ...
2
votes
2answers
90 views
How could a Widget behave differently depending on sidebar
if sitting on sidebar-1, I need my widget to behave differently than if it were on sidebar-2. How can i detect the sidebar it is sitting on from within the widget() function?
The widget contains a ...
2
votes
1answer
639 views
Duplicate and alter sidebar for Twenty Eleven
I'm trying to create own template including submenu instead of the regular sidebar in Twenty Eleven.
Although I manage to create and select my new template the page ends up with bad CSS.
Here is ...
2
votes
1answer
966 views
Changing name of sidebar widget
I have created dynamic sidebars. They are working fine and appear in the Widgets area.
However, I would like to customize the name that appears on each sidebar.
So, right now each sidebar is named ...
2
votes
1answer
704 views
Contact Form in sidebar
I have a Contact Form 7 form as a page on my site. I'd like to place the contact form on the sidebar. How can I do this?
2
votes
2answers
569 views
Flickr plugin that will display photos from multiple group pools? [closed]
Does anyone know of a wordpress plugin that will pull in photos from multiple flickr group pools, and display random thumbnails in the sidebar?
There are a ton of flickr plugins, and I just can't ...
2
votes
1answer
41 views
duplicate sidebar
I have a problem with a sidebar. I have 4 sidebars: "Essential", "Essential+", "Premier" and "Premier+".
register_sidebar(
array(
'name' => __('Essential Plan'),
...
2
votes
3answers
818 views
How can I show the Jetpack Subscriptions form in a page?
In the Jetpack plugin, the subscriptions module can be included in your blog by following these instructions:
To use the Subscriptions widget, go to Appearance → Widgets. Drag the
widget labeled ...