Widgets are configurable elements used to dynamically build sections of a WordPress theme.

learn more… | top users | synonyms (2)

2
votes
1answer
63 views

List sidebars on a page

I need to generate a list of sidebars on a given page. I know how to list all sidebars that have been registered, and all sidebars that have been registered that have active widgets, but I do not know ...
2
votes
1answer
143 views

How do I add Widgets to my theme and activate them on my site?

I registered the widget area in my functions.php and they appear in my admin area but when I drag it over to the right hand panel to make changes none of them seem to do anything. Anyone know what I ...
2
votes
1answer
3k views

Custom widget using get_categories select menu dropdown

I have created a custom widget that is supposed to display a select menu with all the categories the blog has. I have used get_categories to compile the list. This works fine and all categories appear ...
2
votes
2answers
494 views

How to delete cached transients from a widget instance properly?

So I have created this widget which pulls a number of posts. And the query is being cached via transients. But I need the transient to be deleted whenever a post is saved so the query can be ...
2
votes
2answers
268 views

Different rss feeds in a single dashboard widget

I am using this snip of code to get rss feed on my dashboard as widget. It becomes problematic when it displays 5-6 different rss feeds which makes me run down deep. How can I add 6 different feeds ...
2
votes
2answers
5k views

Where to find the source code of a widget?

i would like to find the source code of the widgets, would you know where to find them? I found the class WP_Widget, but i would like to find, for example, the widget with the last articles. Thanks
2
votes
1answer
534 views

Widget Options Not saving

I am trying to create a custom Recent Posts widget that accepts a category, to show only posts in that category. I'm having trouble saving the widget options. I've done some debugging and found that ...
2
votes
2answers
86 views

Detect if a plugin was included in a certain page

I´m developing a theme that include plugins. One of this plugins is a contact form. And this plugin have an asociate code to validate input data. Because I don´t know in what pages contact form was ...
2
votes
2answers
333 views

Separate backend “Widgets” page for each language

Im currently trying to make my backend work with multiple languages. Im using qTranslate as my translation plugin. So far I have accomplished a custom option page with multi-language support. When ...
2
votes
3answers
599 views

Use wp_enqueue_style based on user option in widget

I currently developing wordpress widget for my website. This widget will pull user latest post in my website and show in their blog. In the widget there is option for user to use their css or my css ...
2
votes
3answers
464 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
926 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
237 views

Anything I can add to functions.php to make text widgets accept PHP?

Is there a way I can make text widgets accept PHP? Perhaps something I can add in to functions.php? I'm redesigning my site, and I was wondering why I didn't use widgets at all in my current design, ...
2
votes
1answer
3k views

Is there a need to do apply_filter('widget_title', $instance['title']) or any other 'widget_xxx' filters?

I am reading the book Professional Wordpress, and have code like $title = apply_filters('widget_title', $instance['title']); $name = apply_filters('widget_name', $instance['name']); ... I wonder if ...
2
votes
2answers
2k views

Bookshelf plugin and/or widget [closed]

I'm looking for some kind of plugin and/or widget to display a list of book covers in the sidebar. Are there any good options out there?
2
votes
3answers
8k views

Which tabs widget plugin for wordpress is better? [closed]

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
2k 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
1k views

Enabling Widgets By Default in Custom Theme Development

In WP theme building, if a sidebar is not active, can I turn it on? Also, if the sidebar is active, and doesn't contain any widgets, can I add some? I'm a theme and plugin developer, but this is ...
2
votes
1answer
540 views

Get Widget Instance inside Widget

I'm trying to access the $instance variable from a custom function I've written inside my Widget, but I keep getting a "variable is undefined" error. How can I re-create the $instance variable? ...
2
votes
1answer
606 views

Widget options get

How to get widget options? I've tried like this, like seen in the other question "Using widget options outside of the widget": $w=get_option('widget_wp_mywidget'); $one=$w[2]["myval"]; ...
2
votes
2answers
548 views

Elegantly using JavaScript on widget admin forms

I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've ...
2
votes
2answers
378 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 ...
2
votes
2answers
632 views

Reorder dashboard widgets

I recently tried to reorder the dashboard widgets by writing a plugin. I accomplished this: with the following code: <?php /* * Plugin Name: Custom Dashboard * Description: Custom dashboard ...
2
votes
1answer
474 views

Make compatible custom menu widget for Twitter Bootstrap

If I configure wp_nav_menu function, I can put the "items_wrap" option to achieve a nice navigation given by Twitter Bootstrap, thus: <ul class="nav nav-pills">%3$s</ul>. But, how to ...
2
votes
1answer
655 views

How To Add an Extra Field in All WordPress Available Widgets?

I keep searching on how to add an extra field on every WordPress available widget, something like Subtitle after the widget's Title. Is there a way to hook on every available widget?
2
votes
1answer
70 views

Query for recent images across multiple posts

I'm a bit fresh to wordpress theme development (and PHP in general), and I'm curious if there is a way to query XX number of recent images, likely spanning across multiple posts. Basically I want to ...
2
votes
1answer
164 views

How does the default recent posts widget work with cache?

I am trying to build a widget based on the default wordpress recent posts widget. In wp-includes/default-widget.php , I noticed in class WP_Widget_Recent_Posts in function widget(), the recent posts ...
2
votes
1answer
1k views

How do I register a stylesheet inside a WordPress widget?

I'm developing a WordPress widget following Dave Clements tutorial. It works well. Now I want to add some styles to it. I want the styles to be in an extra css file which will be loaded during ...
2
votes
1answer
86 views

Multiple users editting widgets

I have just completed a website using WordPress as a CMS, the site has 6 people administering the content and in the couple of days before launch all 6 were updating the content. We found that if ...
2
votes
1answer
803 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
435 views

Closest thing to an is_widget() tag?

I have a custom widget with a WP_Query loop that's using get_template_part() to include some standard information that I also use in theme files. However, I need to make one small change to the ...
2
votes
2answers
231 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
576 views

How to get popular post from across a network?

I have a multisite network on WP 3.3.1. I now need to get all popular posts from across this network (preferably based on the amount of views). Is this possible, and how do I do that?
2
votes
3answers
108 views

Is it a good idea to make whole theme widgetized?

I have mainly seen sites using widgets on sidebars or inside multi-column layout. However, I was wondering what if we could use widgets in every blocks like header, main content block, footer etc. Is ...
2
votes
2answers
1k views

How to place random widgets in the Wordpress sidebar?

My pages have a sidebar with too many widgets, and it looks bad when the content is short and the sidebar is too long. I want to randomize the widgets I'm showing in the sidebar. Meaning I will add ...
2
votes
1answer
548 views

Add new section to “Right Now” widget

I've been hacking away at modifying the "Right Now" widget in the WordPress dashboard, and although there are some hooks/filters which apply to just that, they are sparsely documented or explained. ...
2
votes
2answers
1k views

How to process content in a widget? [duplicate]

Possible Duplicate: Is There A Hook To Process The Content Of The Text Widget? I have created a plugin that uses tokens in the body content to dynamically insert certain content. For ...
2
votes
2answers
560 views

Categories lose hierarchy order once assigned to post

I setup some hierarchical categories and when I assign them to a post the widget reflows and loses the hierarchy display. Example: - Education Services -- Arts & Archives --- Fine Arts -- ...
2
votes
2answers
1k views

How to pass custom options from widget form to widget update callback?

I've added a few checkbox options to the default widget form. But I'm stuck on how to access these option states and pass them along during the widget save event (widget_update_callback) so that they ...
2
votes
1answer
158 views

Broken markup when using the_excerpt() in a widget?

The text returned by the_excerpt() does not respect my widget format. I couldn't explain it better so I will just show you my code: function widget($args, $options) { extract($args); ...
2
votes
1answer
680 views

Duplicate and change a Theme Widget

Is there a way (a common one) to duplicate and change a theme widget ? I'm asking this because, I have this widget that displays the recent news and if we click, it will display ALL news, but I wish ...
2
votes
1answer
34 views

Are there plugins that interfere with the admin part of Rss widget?

I've been using the Rss widget in my site, and suddenly a few days ago, the admin part stopped responding. That is, I'd change the link to the Rss and it wouldn't get saved (and therefore would show ...
2
votes
2answers
2k views

How to create a widget that has a submit form in the front end

How to create a widget that has a submit form in the front end? The reason for this is I'm teaching myself plugin development and I'm struggling on how to display a form on the front end after adding ...
2
votes
1answer
2k views

Creating a admin widget for /wp-admin/post.php?

Hello and thank you for helping in advance, I am trying to create a widget that lives inside the post.php page for when editing a post that exists (Not new-post.php, I need an ID). This custom ...
2
votes
1answer
1k views

Contact Form in sidebar [closed]

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
687 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
2answers
360 views

Searching for a better Twitter widget

I'm using the "FriendFeed Activity" widget to show the latest 7 enties of my friend feed. However, FriendFeed just aggregates my Twitter, Blog (via RSS) and YouTube activities. That are things Twitter ...
2
votes
1answer
33 views

how can i limit the number of instances for my widget

I am developing a generic widget that randomly selects an image to be displayed. I only have 5 images to choose from. Is there any way to limit the number of widgets to 5, so that there are no repeat ...
2
votes
1answer
76 views

How do I add a widget programmatically to a newly created site (WPMU) within a plugin?

I'm making a plugin that creates new sites (WPMU), and also has its own widget that needs to be placed onto the new sites it creates. The issue I'm having is that I can't get the plugin to insert ...
2
votes
1answer
134 views

Randomize widgets displayed in my sidebar [duplicate]

I have a sidebar which might have any number of widgets. I can count the number of widgets that exist in the sidebar. How do I display randomly only one of the widgets in my sidebar at each page load? ...