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

learn more… | top users | synonyms (1)

2
votes
2answers
2k 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
67 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
392 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
305 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
171 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
103 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
750 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
472 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
115 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
448 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
144 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
397 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
230 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
815 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
634 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
354 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
43 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
75 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
68 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
646 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
183 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
64 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
86 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
349 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
574 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
279 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
392 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
345 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
763 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
995 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
253 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
491 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
272 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
1answer
78 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
196 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
247 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' => '', ...
2
votes
1answer
447 views

wp_count_posts, wp_count_terms and wp_count_comments for specific user?

Is there a way for the functions wp_count_posts, wp_count_terms and wp_count_comments to return their results only for a specific user, possibly by using a user's ID? I'm making a custom "Right Now" ...
2
votes
2answers
441 views

Widgets not expanding on wordpress 3.3 widget dashbord

I updated to WordPress 3.3 (manual update) and cleaned browser cache. Widgets dashbord stop working when tring to expand dynamic sidebars for custom theme when it works for previous wordpress 3.2 ...
2
votes
3answers
1k views

How do I create a widget that only allows a single instance?

How do I create a widget that only allows a single instance of a widget to be added through the Wordpress interface? The default behaviour of widgets allows multiple instances to be added. I am ...
2
votes
0answers
88 views

Insert widgets after theme installation [duplicate]

Possible Duplicate: Install widget on plugin activation Programmatically add widgets to sidebars I'm creating a theme and after the installation it is need put the widgets. Exists any way ...
2
votes
1answer
312 views

How to determine if post has widget content?

I've got a registered sidebar called "my-header" that affects the absolute positioning of elements below it in the markup. So I need to execute a query in header.php to determine if the sidebar is ...
2
votes
2answers
1k views

How to automatically register widgets on new blog?

Is there a way to automatically register widgets when a new site is registered with a multi site setup? E.g. inside wpmu_new_blog?
1
vote
2answers
161 views

How to put Stack Exchange Flair as widget?

I want to put my flair in as a widget in the top of my sidebar in my blog. There was a similar question asked here but the only answer links to the flair page and suggests copying and pasting the html ...
1
vote
5answers
210 views

Dynamic widgets

In wordpress is it possible to have different widgets on different pages, I mean, I am having a form widget which has to be just displayed on posts page, it should just display on single.php Is this ...
1
vote
3answers
10k views

How do register_sidebar() and get_sidebar() work together?

Disclaimer: I am brand spanking new to WP. I am using the Starkers HTML5 framework theme. In the functions.php I see this code: function starkers_widgets_init() { // Area 1, located at the top ...