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

learn more… | top users | synonyms (1)

2
votes
2answers
396 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
358 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
451 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
63 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
139 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
2answers
3k views

Where is the content of widgets stored in mysql table

I have the cPanel access to a website but no wordpress login info. So I wants to change a widget content in the website. How can I change it through phpmyadmin. Where are that widgets sidebar data ...
2
votes
1answer
75 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
502 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
341 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
195 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
3answers
105 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
832 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
497 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
123 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
2answers
491 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
1answer
147 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
449 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
231 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
2k 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
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
1k 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
865 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
654 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
358 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
49 views

Programmatically edit the text of a widget

I have text widgets that contain text. I'd like to programmatically edit that text. Is there a way to do that?
2
votes
1answer
33 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? ...
2
votes
1answer
54 views

Tips for targeting widget dragable for WP Pointer on widgets.php page

I'm updating a widget plugin I wrote called Feature Me and am adding in WordPress pointers for first time users to help them find the widget after installing the plugin. However, I have come across a ...
2
votes
1answer
87 views

Add 'Right Now' widget to custom dashboard

I have created a custom dashboard page to which the user is redirected when logged in. I want to include the 'Right Now' widget to my custom dashboard page. How do I achieve that ? class CustomDash { ...
2
votes
1answer
75 views

nowplaying.include.php Will Not Display Results

Cyberchimps.com recommended I post here as they believed there may be a global issue with my request. I thought what I was missing was obvious and simple, but two months into this and being referred ...
2
votes
1answer
1k views

Using Advanced Custom Fields in a widget

I've built a widget to show pages from a certain category in a dropdown menu. The page that's selected will show up on the homepage. This all works, except the Advanced Custom Fields (ACF) are all ...
2
votes
2answers
184 views

I need some direction on how to have a sidebar based on meta rather than page

I'm working on a plugin that allows the user to create "page/post types", customize the type style, then tag a page/post with that type. All of this works. My problem is this plugin also needs to ...
2
votes
1answer
736 views

How to register custom menu widget

I'm trying to register a custom menu widget programmatically with wp_register_sidebar_widget, but it doesn't appear in wordpress. I'm using remote call of that method (xml-rpc). Referring to codex I'm ...
2
votes
1answer
71 views

How to determine which registered sidebar area a custom widget is loaded into

I have a custom widget that I want to apply conditional logic to, depending on its parent sidebar's registered ID. For example, my theme has 6 registered sidebar widget areas. I have a custom widget ...
2
votes
1answer
95 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
1answer
389 views

Pass variables from one widget to another widget

I wrote a widget but I need to use the variables from one widget in another...both widgets are in the same dynamic sidebar. This is what I am trying to do: I wrote a widget that adds a footer to the ...
2
votes
2answers
687 views

Is it possible to enqueue a script from a widget method (of extended WP_Widget object)?

I am creating a widget plugin that a user could potentially use multiple iterations of the widget multiple times on a single widget-area / multiple widget-areas on a single page. Because of its ...
2
votes
1answer
289 views

Adding a widget programmatically

I want to add widgets to my wordpress site programmatically. I tried the following code from the codex docs: class MyNewWidget extends WP_Widget { function MyNewWidget() { // Instantiate ...
2
votes
1answer
453 views

Edit the output of wp_widget_rss_output()

I want to show rss feed in my dashboard widget, i use this code: wp_widget_rss_output(array( 'url' => 'http://www.example.com/', 'title' => __( 'Some Title' ), ...
2
votes
1answer
363 views

Custom Menus, Widgets & Conditional Statements

I'm employing custom widgets for my client because it's easy and they have several menus they need to create specific to site sections. I then want to allow them to add to the custom menu dynamically ...
2
votes
2answers
873 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
2answers
1k views

Add custom post types stats to a custom dashboard widget

I have a lot of custom post types and I have them showing in my "Right Now" Dashboard but it's gotten pretty long so I want to separate them to a custom widget within the dash. See example below: ...
2
votes
2answers
260 views

How do I use the control callback when creating a simple dashboard plugin

On this page: http://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget The function wp_add_dashboard_widget is described. It states: wp_add_dashboard_widget($widget_id, $widget_name, ...
2
votes
1answer
511 views

More flexible sidebar and widget management

I’d like to have a plugin for a flexible sidebar/widget management. In fact, I want to give a user the possibility to choose which sidebar should be displayed per page/post. I know there are many ...
2
votes
1answer
279 views

Count widgets of a certain type

How can I get the number (count) of, let's say, text widgets from a sidebar? for eg. if I drop 4 text widgets in the sidebar, I want to get this number somehow from another widget
2
votes
0answers
29 views

Why won't my custom widget stay in the sidebar after a reload?

After I drag my custom widget into a widget area and reload the page it's gone. Any ideas? <?php add_action('widgets_init','register_postTypeWidget'); function register_postTypeWidget(){ ...
2
votes
1answer
101 views

Trying to wrap <span> around first word of multiple word strings with a widget_title() filter, only works on two word strings and not more than two

I am trying to wrap a around the first word of multiple word widget titles. I have used the answer from here: ...
2
votes
2answers
207 views

javaScript in <head> section of WP API

How do I place the following javaScript in the <head> section of the Wordpress Widgets API menu screen? <script type="text/javascript"> jQuery(window).load(function() { ...
2
votes
3answers
291 views

How do I save data from submitted form from widget

I'm looking over internet for some simple solution of email subscription widget but no luck. Or they are too complicated and paid, or they are relaying on some external email functions. I'm not a ...
2
votes
1answer
78 views

add widgets to dashboard for easy access for clients?

I have a widget created: if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Featured Video', 'before_widget' => '', 'after_widget' => '', ...