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

learn more… | top users | synonyms (2)

1
vote
2answers
568 views

get_option returns undesired blank instance of a widget

I am presently trying to call the fields of a custom widget using get_option and loop through the array created from the get_option() call. The issue is that it is outputting a blank one at the end, ...
1
vote
1answer
817 views

Paging in a sidebar mini loop

I switched to another theme and decided to make a widget of some default code I had in there which shows my delicious posts, twitter posts, su posts and youtube vids in a custom loop (excluding these ...
1
vote
2answers
2k views

Adding a rich text editor to a widget - specifically CKEditor

I am trying to add a rich text editor to a widget and am using CKEditor ( http://ckeditor.com/download ) with a simple toolbar. Everything works fine until I try to save. When clicking on "save" the ...
1
vote
1answer
1k views

Help with custom widget options! (saving checkbox option)

I created a custom Flickr Widget for Wordpress and successfully set up an options form for users to enter their Flickr information, but I cannot get the checkbox in the form to save whether or not it ...
1
vote
0answers
18 views

Widget area inside a widget

I tried putting dynamic_sidebar('widget-id') inside a custom widget I created and it worked. The only thing I can't figure out is how I can do this through a loop. Is there a way that when the widget ...
1
vote
0answers
15 views

WP_Widget instance value to wp_head

I have some problem with dynamic variable on widgets. class instaslidewidget extends WP_Widget { public function __construct() { parent::__construct( "text_widget", ...
1
vote
1answer
26 views

Custom Tag Cloud widget missing tags

I was trying to create a custom tag cloud widget that will look like this: Also, when I tried including some new tags in my post then it's showing something like this (just one tag): This is my ...
1
vote
1answer
48 views

Wordpress: How to embed a widget on a separate website?

A client requested that we make a copy of their WordPress widgets onto a separate, non-WP site. Is there an easy way to "plug in" the widget? I imagine I would have to somehow source to something ...
1
vote
1answer
17 views

php to add a link into wp widget without specific url

I'm trying to write a plugin to a specific page that the plugin creates. The issue is how do i add a link to that page from the widget. I know the page but the url has to be picked up from the site it ...
1
vote
1answer
30 views

How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?

I wrote a plugin with custom widgets for the Dashboard. It retrieves information from an XML file, and display the information into the widget. The XML file will be modified a bit every few minutes or ...
1
vote
1answer
66 views

Allow shortcode for custom widget

The following code allows shortcode parsing for 'text' widget: add_filter('widget_text', 'do_shortcode'); How to make a similar one for a custom widget? I tried the following one but it didn't ...
1
vote
3answers
77 views

Using jQuery in widget development

I'm working on a widget that do some magic with jQuery (slide,fades elements). The problem is that the jQuery script attached to widget is not called when I delete and then replace the widget in the ...
1
vote
0answers
49 views

Widget options are not updated

I'm creating a plugin which creates a widget with some options. I've extended the WP_Widget class: class Dynamic_Player_Widget extends WP_Widget { function Dynamic_Player_Widget() { ...
1
vote
1answer
48 views

Insert Widget option into mark-up with register_sidebar

I have added a custom field to my all widgets in my theme, called "custom-title". I have managed to save the field into the database for each widget, like so: s:12:"custom-title";s:17:"HELLO TEST ...
1
vote
2answers
112 views

Display attachment, post and page in recent comments widget

The following code (old post is here and author is diggy) is useful, but i'd like display post and page on recent comments widget, not only attachments. function wpse80087_widget_comments_args( $args ...
1
vote
2answers
71 views

Unregistering a Sidebar in Child Theme

I'm working with a handy responsive theme framework (Reverie) and I'm developing my own theme the right way using a Child theme. The Parent theme calls a sidebar called with an ID of 'Footer' and ...
1
vote
1answer
54 views

Create variable from widget instance

Is it possible to return a widget instance into a variable or array? I'm thinking something along the lines of $widget['title'], $widget['content'] etc. I have tried inspecting the global ...
1
vote
1answer
51 views

Which settings/options are saved on a theme-basis and how does this affect theme-switching?

I realized that when switching the theme (in my case to a child theme) some things don't stay the same: Widgets Menus At least this is what I found out so far: Widgets Don't lose widgets when ...
1
vote
0answers
33 views

Widget on the right side of the page overlaps with the left side

I added the mailchimp widget to the right column of my blog. But for some reason, it overlaps with the main content of the blog. Here is a screenshot of what happens Would anyone know why this ...
1
vote
1answer
131 views

How to add a text widget during theme activation

I'm trying to add a text widget with the title and text set, to two custom sidebars in my custom theme. But, I can't find a clear walkthrough of how to do it. I've seen bits of code here and there, ...
1
vote
1answer
138 views

jQuery does not work in widget backend

I created a widget which should use jQuery for switching between two views and implement the jQuery UI date picker. I was wondering why my jQuery code does not work as I noticed that the date picker ...
1
vote
1answer
47 views

Registering a stylesheet inside my WordPress widget

I did see the other topic similar to this but I cannot get mine to work. I am using WordPress 3.8 and am creating a custom widget for a site. I need to style it a certain way so I need to load an ...
1
vote
1answer
128 views

How i can widget ID get after drag for wordpress with jquery?

I create custom widget with select option image but first time selected option image are not showing after saving this function work perfectly,I need this function only load after Drag in sidebar ...
1
vote
1answer
63 views

Why does my widget break other widgets?

So this widget i created is killing all other widgets registered in the same sidebar. Meaning, nothing renders after this widget does. No other widget markup makes it to the DOM. After hours of hair ...
1
vote
1answer
122 views

Restrict access to specific widget field based on user role

I'm looking for a way to restrict the ability to drag certain widgets to specific widget areas in the widget editor. For example, I would like to restrict the widget field 'ads' to only be available ...
1
vote
0answers
222 views

Edit and make class-wc-widget-featured-products.php update-proof

Within the class-wc-widget-featured-products.php file I need to Remove this on Line 101: <?php if ( $r->post->post_title ) echo get_the_title( $r->post->ID ); else echo ...
1
vote
1answer
138 views

Dashboard Widget Form

I created a Dashboard widget to send push notifications to an app, but the way I have it coded, whenever I make changes in the Plugin Editor and press Update File, the code gets ran and I get a blank ...
1
vote
0answers
129 views

How to update the widget form when the image is selected?

I have created a custom widget. There are 2 things that I can't do: I need to open the new media uploader window when the button "Select The Image" is clicked. When the image is selected from the ...
1
vote
1answer
374 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
1
vote
0answers
61 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
1
vote
1answer
965 views

Display Widgets Horizontally in Area [closed]

I am building a custom bootstrap 3 theme. I have created a new widget area for my header and am trying to get the widgets there to display horizontally, in line. I've looked up several tutorials, but ...
1
vote
2answers
2k views

HowTo: Add Class to Sidebar Widget List-Items

The newest version of Bootstrap (v3.0) adds a new List Group component which has the following structure: <ul class="list-group"> <li class="list-group-item">Cras justo odio</li> ...
1
vote
0answers
69 views

Custom taxonomy widget in admin area

I have a custom taxonomy set up on a custom post type and the box it uses is the same as categories, except I wanted to make it easily searchable using a filter script and then also allow the user to ...
1
vote
2answers
59 views

How can I inject html after the [x]th widget inside a Sidebar? [duplicate]

I can't provide you with any code since I not really know where to start. I like to add some programmatically created widgets (or just html) after the 1st Widget inside my sidebar. Right now I have ...
1
vote
1answer
591 views

How to “pair” two widgets side by side in one sidebar [closed]

Currently I use the Pinboard theme with 2 sidebars. In each sidebar I place one kind of widget several times. The point is that 2 widgets of a row (1 of each sidebar) belong together regarding the ...
1
vote
1answer
67 views

Ajaxing function in widget class

I want to ajax function declared in function Widget in widget Class ,it have arguments belong to the widget i try this code add_action('wp_ajax_my_func', 'my_func'); ...
1
vote
1answer
692 views

Ajax load more button in Recent posts widget

I create Recent posts widget and i trying to create load more button for it to get more Recent posts links by ajax ,is there any tutorial for how to make it?
1
vote
2answers
659 views

Conditional tag in Widget Logic for checking if top level page or if subpage

I'm using the Widget Logic plugin to show widgets on certain pages using Wordpress Conditional Tags (or any general PHP code). What I would like to do is only show a widget on child pages, not top ...
1
vote
1answer
95 views

How do i place same widgets multiple time by default on theme activation?

I am creating a portfolio theme and want to place some widgets on sidebar by default on theme activation. I did it but the problem is that, I want to place Text widget two times at the same sidebar ...
1
vote
1answer
110 views

RSS dashboard widget not showing visuals

I am using a RSS feeds widget on my dashboard as shown in this Q&A. Problem is feeds doesn't show up any visual like images or videos. I verified this by looking raw feeds which I used. Here is a ...
1
vote
2answers
153 views

How to add custom widget above admin_footer

What I am trying to accomplish is placing custom widget on an admin page (edit.php). I tried using these two functions: Places custom html right below < body > (above all page content) ...
1
vote
0answers
31 views

Adding custom menu widget to sidebar programatically [duplicate]

I am trying to add custom menu widget to the sidebar. I am not working on wordpress directly, but I am using an xml-rpc calls to manage worpdress site (it is possible via ...
1
vote
1answer
651 views

Add tinymce to widget textareas

I've got several custom widgets which are extended from WP_widget. Many of these have textarea fields. I'd like to be able to apply a special css class to certain of these textareas in order to ...
1
vote
1answer
844 views

How to create a 'single' category widget for woocommerce plugin [closed]

Woocommerce out of the box provides many widgets, however the category widget for providing a product search, groups ALL the categories into one widget. I want a widget for one category, i.e. 'shop ...
1
vote
1answer
418 views

remove post and categories/tags count from right now dashboard widget

I know it is easily possible to add a post-type count for a custom post type to the right now dashboard widget. However I wonder if it is also possible to remove stuff from this widget. E.g. I ...
1
vote
1answer
112 views

How to create a dashboard widget for one user

I will start by warning you that my programming skill is limited. I need to create a dashboard widget that will display in the WP dashboard for the users with the user_id=21. So far I have tried the ...
1
vote
2answers
309 views

Add description to custom text widget and display the 5 recent post titles

I just started coding and working as an intern for a company. My boss asked me to create a custom text widget for practice in making word press widgets. The problem I am running into is I have no idea ...
1
vote
1answer
299 views

How the widget can be run by shortcode

I have my own widget, that uses WP_Widget class, and executes its code inside function in this class. Is there any ways to run this widget using shortcode inside post? This is how my widget ...
1
vote
0answers
32 views

How to hook into unregistering a widget instance?

I would like to hook into a widget instance after it is removed from a sidebar panel on the Appearances -> Widgets admin page. So if the instance was an active widget and then removed, I would like ...
1
vote
0answers
27 views

Theme development: Pre-activated widgets [duplicate]

Possible Duplicate: Programmatically add widgets to sidebars Is it possible to develop a theme that has certain widgets automatically activated when the theme is activated? For example: ...