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

learn more… | top users | synonyms (2)

1
vote
1answer
62 views

How can I whitelist only specific shortcodes for processing in text widgets?

I know that I can use the following filters to enable processing of shortcodes in Text Widgets: add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); How can ...
1
vote
1answer
77 views

Add more widget areas to a theme

what's the best approach to add more widget areas to a theme? currently, my theme has 2 columns that display the widgets, but I'd like to extend it to 4 for example. It currently looks like this: ...
1
vote
2answers
177 views

Debug errors on sidebar

I'm uising a child theme of twentyfourteen on wordpress 3.8. When in debug mode, I get the following errors regarding a widget. Notice: Trying to get property of non-object in ...
1
vote
3answers
226 views

right_now_content_table_end function not working?

I noticed recently my custom counts for custom post types are not showing on the dashboard. Im using this function: right_now_content_table_end It worked well before, Im not sure when it stopped ...
1
vote
1answer
2k views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
1
vote
1answer
920 views

Adding WordPress colorpicker in widget settings

I want to add the WordPress default colorpicker in widget settings form. Here's what I'm trying: In my functions.php, I have this: function widgets_scripts( $hook ) { if ( 'widgets.php' != $hook ...
1
vote
1answer
340 views

Most commented last 24h, week, month, year and all time - posts_where

I've removed my old post here, as the posts_where method is outdated. Thanks to kaiser, this is now how easy it is to list most commented posts within a certain time span: <?php $popular = new ...
1
vote
2answers
392 views

Passing values from a widget to a function within a plugin

I have a plugin that is built with many widgets. A widget's bundle. Each widget creates it's own custom CSS code. Instead of having messy source code where I display 15 different sets of inline CSS ...
1
vote
1answer
433 views

Widgets not activated alert after using get_sidebar()

I stumbled upon avery strange problem while creating a sidebar for my wordpress theme using the get_sidebar() function in header.php. I inserted the following code in function.php: function ...
1
vote
1answer
114 views

Override widget in function WordPress

Im trying to override the text widget in WordPress. My code looks like this: class WP_Widget_Text_Custom extends WP_Widget { function __construct() { $widget_ops = array('classname' ...
1
vote
1answer
6k views

Use Media upload in custom widget on wordpress 3.5

I'm creating a small widget for wordpress 3.5 that allows you to upload images. The widget is loaded correctly by wordpress. When I add the widget to a sidebar upload button does not work. If I ...
1
vote
2answers
1k views

Making footer widgets responsive

I have 4 footer widgets in the theme I'm working on. It works great. The only thing that I can't get to work is the responsiveness of the widgets. The 4 footer widgets keep on showing up next to each ...
1
vote
1answer
98 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 ...
1
vote
1answer
704 views

Adding widgets to header and footer from plugin

i created 4 header and 4 footer widgets using a site spesific plugin, the reason been that when i change themes, i keep all of my widgets. i created two files, one for the header widgets and one for ...
1
vote
1answer
31 views

Archive - same title for the first two posts

I created an archive page called archive.php Here I include header / footer and this code: <?php if (have_posts()) : while (have_posts()) : ?> <h1 class="entry-title"><a ...
1
vote
1answer
27 views

Print owned created widget

Im trying to print my own created widget with the following function: the_widget(); The widget is defined with the following values: $this->WP_Widget('openingHours', 'Opening', $widget_ops, ...
1
vote
3answers
358 views

jQuery UI inside widget on admin page

I have created a widget that has quite a few settings, and so I am trying to create a tabbed menu (using jQuery UI) inside the widget settings of the admin page. The problem is basically that tabs ...
1
vote
3answers
285 views

Displaying a widget in sidebar only when no other widgets rendered?

I am working on a custom theme, basically migrating a current sites look and feel into WordPress. Most of everything is based on Pages, and all of these pages should have a left sidebar. Of those ...
1
vote
2answers
258 views

Style the archives/category sidebar widget via theme

I would like to change the appearance of the categories and archives widgets in the sidebar such that each category/month alternates the row color. The only way I know how to accomplish this requires ...
1
vote
1answer
168 views

Custom page sidebar using Template dropdown box

i am wondering how i go about making a Template for some of my pages to use a different sidebar? I have created the widget like this: register_sidebar(array( 'id' => 'ourPat-sidebar', ...
1
vote
2answers
226 views

How to check if searchform.php is being included as widget?

I'd like to put something like this in searchform.php: <?php if($widget){ ?> //load serach form for sidebar... <?php }else{ ?> //load different search form for page content (404 ...
1
vote
3answers
3k views

Wordpress Custom Menu Widget Style

I am wondering if anyone knows the best method for splitting 1 custom menu widget (located in my sites footer) in to 2 columns. There are a total of 8 links, so I would like it to be split in to 2 ...
1
vote
1answer
182 views

I want to display custom text widgets for each post in the sidebar?

Ideally I am looking for two text boxes added to the 'Add new post' admin page, and the data from those two boxes be displayed in the sidebar when viewing the post page. So the sidebar displays the ...
1
vote
1answer
376 views

Dashboard widget custom positioning?

I cannot figure out how to arrange my custom widgets one left and one right. I'm using this code to create custom widgets: //Add my comments. Shows user his last 5 comments function ...
1
vote
1answer
1k views

Latest/Recent posts widget title link

I have been struggling with this for a few hours now... I want to add a link to my recent posts widget title. I have tried a number of options given in forums but nothing seems to work. Tried ...
1
vote
1answer
416 views

Image Uploader API

I want to create a widget for my theme that will let me upload an image to WP and crop it to a certain size. Can anyone point me to the codex page or a tutorial on how to a bare bone implementation of ...
1
vote
1answer
311 views

Custom User Field in Dashboard Widget

I checked justin tadlocks custom profile field tutorial and wanted to add the field in the custom dashboard widget but it seems it's not working. I want to show all the user information in this ...
1
vote
2answers
2k views

Show posts from one category with thumbnail and description on latest

Is there a widget for WordPress to show posts from one category with a thumbnail and description for latest post? WIDGET LIKE: Top news section of WWW.GOAL.com.
1
vote
1answer
106 views

Random image from tag/custom type on sidebar

How would I pull a single random image from custom post type "athletes" and the custom image field "athletethumbnail" to be displayed in my sidebar? (I have PHP enabled for my text widget on sidebar.) ...
1
vote
1answer
246 views

styling back end widget form and enabling multi widget feature

I am reading this tutorial from the end of 2008 on how to make widget and so far everything works fine except that I have few questions that I couldn't find answers there. I need to style back end ...
1
vote
4answers
529 views

How to show different widgets on different pages in a user friendly way

I'm looking for a plugin to let users choose which widgets appear on individual pages. There's some solutions out there, none of which that I've found are truly easy for a non-technical user. I've ...
1
vote
1answer
232 views

Wrap the widget content with a div and get the widget title outside? [closed]

In this subject you can wrap a widget with the title outside but if you don't want a title, a <div> will not be closed, and the template is broken. So I would like to do this in jQuery instead ...
1
vote
1answer
146 views

Big side banners

I would like to have a big header side advertisements like this: What is the best way to achieve that?
1
vote
1answer
665 views

Rotate Widgets or Content Blocks every x sec/min

Is there a way to rotate widgets or text blocks with a Flash banner? I had a widget loading a Flash Video loaded by wordTube Flash and YouTube player. The client wanted to rotate this video together ...
1
vote
2answers
2k views

Widget modifications in a child theme

Can I modify widgets in a child theme? When I change the footer, I don't need extra steps -- it just works. What about widgets? Example: A widget of a theme I am using makes use of google maps. I'd ...
1
vote
1answer
397 views

Multi language site [closed]

I found that two most popular plugins for multi language sites are WMPL and qTranslate. First one is commercial, so this is not option, and second doesn't have ability to translate widgets in ...
1
vote
2answers
56 views

Should use widgets in this case?

We develop a new WordPress site with a new theme developed exclusively for this site. Some widgets of the same type (such as two "Bookmarks" widgets) should be styled differently (that is have ...
1
vote
2answers
297 views

How can I disable widget from being visible on some pages?

I have two widgets in my sidebar, a jQuery vertical menu and an image handler. I need to disable the jQuery widget on my contact page (or hide it or something like this), so that it wont be shown. ...
1
vote
2answers
445 views

Register widget only page is a singular of custom post type

I've made a custom post type, with a few accompanying widgets, and I was wondering if it is possible to show (some of) these widgets only if you're on a specific page. Currently I've got function ...
1
vote
1answer
937 views

Widget: Custom Post Type Post Listing Dropdown on Admin Side

Widget: I'm making a custom widget with the following functionality on the admin side. 3 text fields 2 dropdown menus to select posts by title (both from a single custom post type) Right now, ...
1
vote
1answer
299 views

How do you categorize pages?

I am an experienced Drupal developer who is just getting stuck into Wordpress. For a selected number of pages on a new wordpress build, I need to add them into a category, then add this category ...
1
vote
2answers
1k views

modify a output of a widget

I'm to implement a theme in wordpress. Is possible modify a output (html) of widget in wordpress? For example, the "recent comments widget"?
1
vote
1answer
216 views

Add pagination to listing plugin

I am trying to figure out on how to add pagination to your listing. Think you could help me out? I have added the read more button and manage to customise the listing styles. What's left is the ...
1
vote
1answer
38 views

widgetlogic and permalinks

I'm trying to use widgetlogic to conditionally display menus on certain pages. Each menu uses a tag like is_page(array("Page Name", "Page Name 2" ...)), and works perfectly until I try to change ...
1
vote
1answer
777 views

How to rename wordpress Widget

I want to rename "Widget" to something else Like "Block" or something else. please help me. EDIT Per the user's comment below, she wants to change class="widget" to class="block" (or any ...
1
vote
3answers
255 views

Disable dashboard drag&drop

I need to disable drag&drop functionality for dashboard widgets. This should be realized with jquery, just as it is for the dashboard_browser_nag. I'm no jquery expert - so can anybody tell me ...
1
vote
1answer
499 views

How to display more than one instance for a widget?

I'm using a plugin called Recent category post widget. Unfortunately the plugin developer is no longer offering support. The way this plugin is coded, displays only one instance of the widget (meaning ...
1
vote
2answers
1k views

How to display an RSS feed widget inside a page?

I have an RSS feed (link) that I would like to display as a widget inside one of my posts. The wordpress RSS widget already does that on the sidebar, is there some solution to have it in the post? ...
1
vote
1answer
71 views

allow user to style widget backgound per widget

Is there a way to allow a user to style a widgets backgound per widget? Lets say there are 4 widgets in the sidebar, i want the user to be able to style the first 2 with a blue background, the second ...
1
vote
1answer
779 views

Widget textarea input gets formatted

I've built a small widget for my website It has a couple of inputs, and a <textarea> among others. Whenever someone inputs to the textarea it adds a tab at the begining and changes every ' to ...