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

learn more… | top users | synonyms (2)

0
votes
0answers
14 views

Show widget location borders for development

I'm taking over a wordpress site, whose template has a high number of widget locations in the appearance section. Is there a way to temporarily turn on the widget location borders so I know where ...
0
votes
0answers
20 views

add_filter('body_class') running from widget even when widget is not loaded on page/post

This should be adding a function to init() to check if the widget is active widget on the front end on a page/post - but even when the widget is not loaded on a page/post, .Widget_FilterProject is ...
0
votes
0answers
19 views

Add TinyMCE to WordPress default text Widget

Wonder if there is any way to add the TinyMCE (limited options) to the textarea of a default "Text Widget" in WordPress, Is there any way to do that ? There are few plugins to do the same kind of ...
0
votes
0answers
17 views

Hide/show radio buttons stop working on save

everyone! Here's my case. I'm developing a little widget, and I was looking for a way to hide/show different DIVs on selecting a set of radio buttons. I found the proper code and adjusted it to my ...
4
votes
1answer
66 views

How to use wp_dequeue_style() for style enqueued in WP_Widget class

I've got a plugin that makes a widget that enqueues some front-end CSS to style the widdget. I call wp_enqueue_style from the public widget() method in the extended WP_Widget class: <?php class ...
0
votes
0answers
28 views

Wordpress Widget Administration Javascripts do not work?

I have been working on a widget in WP 4.1.1 and cant seem to even get simple javascript to function on the backend unless WP is put into Enable Accessibility Mode. For example in your Form($instance) ...
0
votes
1answer
21 views

Cannot access variables within a widget

I'm currently learning PHP and Wordpress development from a Java background at the moment. How do I access variables in public function Example_Widget() from public function widget( $args, $instance ...
0
votes
1answer
29 views

Can't save widget

I can't save widget. When I click save, I can see wait circle, and nothing happend. When I visit again widgets section, it's empty. Then I changed view to Accessibility Mode, and still no luck. Then ...
0
votes
1answer
15 views

Display custom widget, added as a shortcode in the correct place

I've created a custom Widget and I would like to add it to the page content as a shortcode. function show_custom_widget() { the_widget( 'WP_Custom_Plugin'); } add_shortcode('custom-widget', ...
2
votes
2answers
96 views

Displaying Widgets

During theme development, I understand how to create basic widgets within the functions.php file. However, when it comes to displaying the widget within a theme, is there a preferred way to display ...
0
votes
1answer
20 views

Editor Widget Role

i need to give to editor role the access on widget (or if possibile on a specific widget). I use the code on this question and function but i have a problem. The editor can see the widget and also ...
0
votes
1answer
23 views

How to activate or install the Gallery Widget?

I would like to activate the Gallery Widget which is presented here. It seems that it's part of the general Wordpress distribution but the widget is not listed under Appearance → Widgets. BTW, I don't ...
1
vote
0answers
33 views

Limit number of widgets in widget area

I used code to limit each widgets area to one widget only. It works great: It uses JavaScript to do so, using the fact that the dashboard’s widgetized areas all use the jQuery UI Sortable library, and ...
0
votes
1answer
61 views

Remove the widgets tab from theme customizer

In some of our sites, I would like the site admins to customize the widgets only on the widget page, and not in the Theme Customizer. How can I remove the widget tab from there?
0
votes
1answer
28 views

I cannot customize custom widgets anymore after moving WordPress website

Originally posted here. The situation is the following one: A colleague of mine built a WordPress theme with some custom widgets which need to be configured through /wp-admin/widgets.php. In the ...
1
vote
0answers
36 views

Access Customizer widget instance form

On the WordPress admin widgets page there is a known issue with the widget form not being available the first time a widget is added to a widget area. This can be seen in this trac ticket here: ...
1
vote
0answers
25 views

Override Widget class in plugins with custom plugin

I am currently modifying a purchased theme for a client that has several required plugins for it to work. One of the required plugins, creates a widget that displays a post type and client would like ...
0
votes
0answers
13 views

How know the “admin” blog from wordpress multisite?

I'm try to construtc a multisite plugin and when I've the multisite list with all the blogs, I need to remove from this list the "admin" wordpress multisite. For example: I've the multisites 'ids' ...
0
votes
0answers
14 views

image carousel widget

Is there tutorial how to build widget where you can upload multiple images? I was trying to look some tutorials on widgets but to my surprise there are only few online. Or then my googling skills are ...
0
votes
0answers
21 views

PHP Wordpress Monthly Top Author in Sidebar

Im trying to show List of Top Author by Property Update Count (Monthly) in my sidebar. How to adjust this php code. This php only show AUTHOR list in my sidebar, not sort it by Monthly Property Update ...
0
votes
1answer
47 views

I want to create a posts widget and be able to select categories

Can you please tell me how can I create a wordpress posts widget that outputs posts based on a categories selection ( category checkboxes of all the post categories ) This is in my form function: ...
0
votes
1answer
26 views

How should I add a “widget” like element?

I would like to add a custom slideshow like "template" which can be called in to other template files. My first thought was to create exactly that; a separate slideshow.php template file which ...
0
votes
0answers
26 views

How to display comments with recent comments default widget?

I would like to create custom widget from the default Recent Comments widget to show also the comment content of commenter. How can I do it? class YOUR NEW WIDGET NAME extends WP_Widget { // ...
0
votes
1answer
40 views

How to add a text widget on the posts admin page?

I need to add a text widget on the posts admin page ie, the post editor page. so that I can add some code in the text widget for some purposes. Right now I have used text widget and this can only be ...
0
votes
0answers
6 views

How do I default the widgets in my dynamic sidebars? [duplicate]

Similar to a previous question that was not technically answered: I have a custom theme with dynamic sidebars and custom widgets. I would like to set what widgets are in those sidebars by default. ...
0
votes
0answers
23 views

creating widget of rotating testimonials

Using this article, http://www.wpbeginner.com/wp-tutorials/how-to-add-rotating-testimonials-in-wordpress/ I converted entire code into widget. In widget creation, I have used title option only. Also ...
0
votes
1answer
27 views

Why isn't a list of posts from my custom post type displaying in this widget?

I have a custom post type called 'blog' . I wish to show a selected number of posts from this custom post type in a widget. But all I get is 'No listing found,' which is the else statements if no ...
0
votes
1answer
27 views

Shortcode into widget

I have this particular shortcode "[example]" I know I can put this in a text widget to make it work. But I was wondering about how I can turn this into a widget called "Example." Any suggestion? ...
0
votes
1answer
59 views

Can I have a widget and sidebars in custom theme?

Wordpress 4.1.1: simular problem to another question: I have a add_action widgets_init call back in which I have a call to register_widget that registers a class and a call to register_sidebar that ...
0
votes
0answers
13 views

Get widgets from particular sidebar

I created a new widget with name rocky_custom_post. It has two instance 'post_id' and 'position'. Post ID is the ID of the posts in WordPress and position is left, right, full. I created a sidebar ...
0
votes
0answers
41 views

Expand Widget Area With Archive DropDown

I have archive drop down widget. but when i open list, these lists are floating over below widgets and not expanding its parent area for drop down list this widget is added by wordpress widget area ...
0
votes
0answers
15 views

transform default widget_category in accordion

Im trying to transform the original widget category from wordpress as accordion; I can find the files which are: default-widgets.php and category-template.php HOwever my back end skills are quite ...
0
votes
1answer
49 views

Check if widget is inside sidebar with PHP

I am creating a custom theme with some widgets. In the theme, to make it easier for my client to update, I am using SiteOrigin's Page Builder plugin, which uses widgets to display content. I am ...
0
votes
2answers
86 views

Get post values of form created by widget in sidebar

I have created this widget function to show a subscription form but from here i am not able to get the the values of input fields when someone submit it. Please help to get post values of the form. ...
0
votes
0answers
17 views

How to add additional for each statement

I am using the function below to display the date of an event (using the Event Espresso plugin). I need to add next to the date, on the same line - the city and state of the event using this for each ...
0
votes
2answers
43 views

'is_author()' logic in widget for author only

So, I have a widget that I only want to show it to the page author. I used the following logic: is_author() However it does not seem to work (it shows non-author) Am I using this logic right? Any ...
0
votes
0answers
20 views

How can I build a widget area widget using the built in Wordpress functionalities?

My Home has a Main Area that consists of all sorts of widgets. Now I am looking for a solution where I can add a custom widget area as a widget and then add all the needed widgets inside that custom ...
0
votes
1answer
35 views

All Posts Have The Same Comments

I'm getting a really weird bug. I'm getting the same comments from 1 specific post which is the "Hello world" for every single post! But when I remove a bit of code for a recent posts widget that I'm ...
0
votes
0answers
19 views

twitter widget loads properly in all themes except my own theme?

I've written my own theme for my wordpress website. The problem is that the twitter widget loads properly in all the themes except mine. Below is the attachment of the widget in both the themes - ...
0
votes
1answer
105 views

WP_Widget dynamic field array with external AJAX

Im creating Wordpress widget, where I have to add parts of code dynamically by JQUERY.ajax() a JQUERY.append() to the widget form. I need it, to be able to save it by function update(). I have PHP ...
0
votes
1answer
24 views

Detect each active instance of a widget

Is it possible to detect each active instance of a particular widget? As part of a plugin I'm working on, I want to run a for each loop on each widget instance Each widget is a Twitter feed and the ...
0
votes
0answers
37 views

Unique widget id to target specific part of widget

I am currently trying to target widget part after title and collapse it on smaller screen where title would be a toggle. This is in my footer area and there are 3-4 widgets that I want to collapse on ...
8
votes
3answers
174 views

Plugin upgrading: Widget settings

I have tried doing some research on this but haven't found anything solid yet. I have a plugin I am working on and between the last version and the new version we made some updates to the widget that ...
0
votes
1answer
95 views

wp_nav_walker that interacts with widgets to setup mega menu

I'm a newbie WordPress developer working on a WordPress theme project that demands mega menus as part of the main navigation. I'm done with the front-end stuff, and now I'm trying to explore the ...
0
votes
0answers
25 views

Widget configuration inside theme

I need to change my theme on the fly (for mobile version I have a different appearance), but widgets are not saving correctly. I tried to configure widgets from the theme, but this method doesn't ...
0
votes
2answers
120 views

how to display custom widget anywhere in wordpress

i've a custom widget for ads,it helps me to show ads on sidebar but i'm trying to display it under every single post or on front page near to slider. <?php the_widget( 'AdWidget_300' ); ?> ...
0
votes
0answers
35 views

Custom widget not saving values

Hello I am very new to Wordpress development , I am trying to implement custom widgets for a theme. the problem is whenever I try to save my widgets settings it will automatically revert back to it's ...
0
votes
1answer
54 views

Custom post types archive

I'm developing my first custom theme from scratch (using Roots as base framework). The theme has 2 CPT, one for events and one for associations with a correlation one to many between the two (an ...
1
vote
1answer
32 views

Creating a one click demo importer

edit: I've re-written this because it is unclear, apologies it was written rushed on a Friday afternoon. Wordpress has import/export functionality for posts within wordpress, I am a theme developer ...
0
votes
1answer
25 views

How to remove a widget from the sidebar on specific page?

I want to remove a widget from page with id '28'. How can I do it? I have found function for it, but it is private function, so I can't use it. "wp set sidebars widgets This function's access is ...