A Sidebar is a theme feature introduced with Version 2.2. It's basicly a vertical column provided by a theme for displaying information other than the main content of the web page. Themes usually provide at least one sidebar at the left or right of the content. Sidebars usually contain widgets that ...

learn more… | top users | synonyms

21
votes
2answers
6k 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 ...
10
votes
4answers
3k 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
3k 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 ...
9
votes
3answers
7k 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 ...
4
votes
1answer
619 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
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: ...
2
votes
2answers
246 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?
7
votes
2answers
4k 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 ( ...
3
votes
3answers
2k views

Get number of widgets in sidebar

How can I get the number of widgets that are active on a specific sidebar? Is there a core function for this? I want to add a class to each widget on a sidebar based on how many of them are ...
3
votes
1answer
1k 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 = ...
1
vote
1answer
67 views

Call sidebar from a template

I need to call a sidebar into my header. I've switched to the new twenty twelve theme and created my own child theme. With this new theme I decided to keep things organised and together, so I put my ...
0
votes
2answers
88 views

Get a sidebar at the top of the page

I want to get a sidebar ( get_sidebar( 'mySidebar' ) ) at the top of the page, so I can't call it after get_header() in the content template. How could I do it?
0
votes
1answer
548 views

is_active_sidebar() Always Returns False

I've never gotten is_active_sidebar() to work, no matter if there's widgets in the sidebar or not I always get false returned. Currently I'm creating a sidebar for each top level page: ...
0
votes
2answers
1k views

how do I get_sidebar into a varaible?

I want to get a sidebar and save it in a Variable, This is impossible with the get_sidebar function since it simply prints out the sidebar, is there another function that I can use?
7
votes
3answers
2k 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 ...
5
votes
1answer
8k views

Translate widget titles using qTranslate plugin

I'm actually using the qTranslate plugin to translate my website. It works really well with everything except one thing. the titles of my sidebar widgets. Actually, to translate some words we need to ...
2
votes
6answers
6k views

Including Custom Post Types in “Recent Posts” Widget

I'm able to easily include my custom post types into my main loop by making small adjustments with query_posts(), but I'm not sure how I would go about including custom post types in the "Recent ...
3
votes
3answers
2k views

Hooking a function onto the sidebar?

I'm looking for a way to add some content to the top of the sidebar when it get's loaded. I've tried hooking onto the get_sidebar action as referenced here, but it seems to override the sidebar call ...
1
vote
3answers
1k views

Best approach for loading a sidebar Only if the screen max-width is >900px?

I have been playing around with media queries quite a bit lately and I love the concept. It is so easy to display images or change div floats depending upon what the users screen max-width is. I'm ...
0
votes
4answers
914 views

Display Custom Taxonomy in Sidebar in Two Columns

I have a custom post type (photos) with a custom taxonomy (categories) and I'd like to display the taxonomy list in my sidebar in two columns. I have a modified snippet that I found elsewhere to do ...
6
votes
1answer
365 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 ...
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 ...
3
votes
1answer
762 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 ...
2
votes
2answers
215 views

Add class to before_widget for all widgets with a dropdown and a counter

Some predefined widgets offer the option to use a select element (dropdown) and/or a counter after each entry. How can I add the CSS classes widget-with-dropdown or widget-with-counters to these ...
0
votes
1answer
174 views

How to List all Sidebars in a Metabox

I'm trying to add a metabox to every page that is a drop down list of all registered sidebars that is then saved in a custom field. I'm using this metabox class I've gotten as far as this: // get ...
-2
votes
5answers
7k views

Incorrect sidebar showing on WooCommerce Store page [closed]

I am developing a refresh of my site on a new VPS plan and on of the main changes is switching from the dreaded wp e-commerce to WooCommerce. The URL to the WooCommerce store page is ...
5
votes
2answers
92 views

Retrieve each widget separately from a sidebar

I would like to retrieve each widget existing in a sidebar in order e.g. to mix them with posts inside the main loop. I know I can use different widget areas (sidebars) but this approach clutters the ...
4
votes
1answer
1k 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 ...
2
votes
1answer
54 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
2k views

How to wrap the widget content with a div or get the widget title outside?

Is there a way to get the widget title outside of the widget area like this: <ul> <li> <h2 class="widgettitle">The title here</h2> <div class=""widget> ...
1
vote
2answers
84 views

Dynamically Register Sidebars For Each Top Level Page

I have a small website that wants a different sidebar for each page containing blocks of text, blocks of images, and blocks of links, etc. What I'm trying to do is register a sidebar for each top ...
1
vote
1answer
174 views

Sidebar random author spotlight

I'm trying to utilize the authors from wordpress to create a spotlight block in the sidebar that selects 1 random author from multiple users and only displays that 1 users information. I want to ...
1
vote
2answers
1k views

Adding 'current_post_item' class to current post in the loop

I'm using a loop in the sidebar of my site to show all the posts that are in that category. Now I'd like to include a 'current_post' class to the current post that is being displayed to style that ...
1
vote
3answers
648 views

Specific and Different Ads for each Post?

I am working with a magazine client who sells adversiting offline in their magazine and now has a WordPress online magazine. Each of their stories is broken into different posts, and they are using ...
1
vote
2answers
226 views

Is there possibility to Customize the present theme adding sidebars

I am using a WordPress theme which has just header and footer. I would like to continue using it by changing the width and adding side bars. Could anyone help me to change the width (to fit to the ...
0
votes
1answer
58 views

Display sidebar that created in functions.php

I'm currently using Wordpress theme for my website. Decide to create my own sidebar, but the styling of it must be remain the same one as original sidebar. I'm had create a new sidebar in ...
0
votes
2answers
86 views

Change a sidebar name?

I'm using a child theme created from a twenty-twelve theme, the theme packs a number of sidebars one which is called "Main Sidebar". Is it possible to change it's name to something else?
0
votes
1answer
202 views

Show Secondary Sidebar on Category pages (archive)

My site has the following structure where one column is for the main content (articles) and the other one, on the right, is for the sidebar (primary sidebar). The theme allows me to change the layout ...
0
votes
1answer
111 views

Custom sidebar not showing in the dashboard

I am trying to create a new sidebar. For that I have used the following code: In functions.php if ( function_exists('register_sidebar') ) register_sidebar(); if ( function_exists ...
0
votes
1answer
486 views

add sidebar area to header of child theme

How can I add some extra sidebar locations for widgets in a child theme. The difficulty I'm having is because the parent theme uses some pretty gnarly setup to define the current sidebars. I would ...
0
votes
1answer
81 views

Add individual <hx> tag to widget title in sidebar

In my sidebar every widget title is enclosed in <h2> tags. I use 4 widgets in my sidebar and I'd like to have the first 2 widget titles as <h2> and the other 2 as <h4>. I changed ...
0
votes
1answer
338 views

Main Sidebar Dispappeared - What could possibly cause this?

I used to have the drag & drop Widgets on Main Sidebar working but for some reason it no longer works. That is, whatever I place there (on the back-end) is no longer visible on the front-end. In ...
0
votes
1answer
212 views

Post X of Y in single.php / sidebar.php

Is there a way of putting "Post X of Y" into my sidebar? I think I can only show it when it is a single blog post (something like checking if the content is_single) but I want to be able to see which ...
0
votes
1answer
220 views

Sidebar missing from Homepage

The home page displays the sidebar below the rest of all the latest posts, leaving a vacant sidebar area for the majority of the (long) page. The sidebar displays fine on any single post. My ...