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

learn more… | top users | synonyms (2)

2
votes
0answers
12 views

How to make a widget expand wider than the column width when editing its settings in the admin

The WordPress Text widget expands horizontally beyond the margin of the sidebar when added to a sidebar and opened in the admin and I am trying to apply that function to a widget. I see inline css is ...
0
votes
0answers
11 views

Post List Widget with custom posts and editing the Read More Link

I actually have 2 questions, one related to the Post List Widget, the other concerns the "Read More"-link. ad 1) I want to show a certain category of posts (only one post at a time) in this widget. I ...
2
votes
1answer
22 views

How can I delete all inactive widgets?

I want to cleanup all inactive widgets. I tried following snippet as suggested by this answer Script to remove all inactive widgets?. $sidebars_widgets = get_option( 'sidebars_widgets' ); ...
0
votes
0answers
5 views

Widget fields not saving

I have read so many questions and tutorials but I cannot figure out why my widget fields won't save. This is the code: class ZimmoNewsletterSubscription extends WP_Widget { public function ...
0
votes
1answer
12 views

How to allow editing of text in sidebar?

I am developing a theme which has an area of the sidebar which displays the blog owner's bio and photo as a background image. I could hard-code this information, however, I'd like to learn how to make ...
0
votes
0answers
12 views

Multilingual multisite > customisable footer across different sites with widgets?

I'd like to keep the structure of the footer similar across all sites using the same Theme. However, each site would need different content in their footer. Here's a concrete example - for Site A: ...
0
votes
0answers
48 views

Showing a Thickbox (tb_show) does nothing

I'm trying to add a media uploader to a widget/plugin and I'm at the stage where I need to add a picture from the media library (or upload a new one). I added some javascript and added an event to a ...
0
votes
0answers
5 views

Ajax navigation for calendar widget only [closed]

I have a calendar widget designed to show CPT posts (including future posts). A quick solution I made to make events without using any plugin. But, the calendar widget has no ajax navigations. I ...
0
votes
0answers
7 views

Sidebar plugins for non-developers [closed]

I've used standard sidebars with Widget Logic to decide what Widgets to show. For example, on the News page I can show News-specific widgets by adding in some Widget Logic. However, is there ...
0
votes
1answer
20 views

Are widget arguments always set inside My_Widget::widget()?

Specifically, are the before_widget, after_widget, before_title and before_title array keys always set inside My_Widget::widget()? I'm wondering if statements such as the following are necessary ...
0
votes
1answer
9 views

How to get data from one wordpress site to another

I have the following sites: 1. Community News site 2. Classifieds site 3. Coupon Site Is there any way I can get data from my classifieds and coupon site on my community news site....like in the ...
0
votes
0answers
11 views

Can't seem to make display:flex work, so that the 3 divs are the same height [migrated]

I need to make sure that my 3 footer widgets are the same height, even if the site user decides to put more content in one of the widgets, so that they adjust in height. I understand using display: ...
0
votes
0answers
15 views

do_action inside of onclick

I'm brand new with making plugins/widgets, and am probably pretty limited to basic in knowledge with php as well. I want to be able to register a function that runs when a button is clicked. The ...
0
votes
1answer
18 views

Widget Script Loads at Bottom of Page

I've been working on a plugin that adds a script to the sidebar when activated. So far, I've been able to display the code, but it loads at the bottom of the page and not in the sidebar. I'm pretty ...
0
votes
1answer
30 views

widgets not working

I pasted my siderbar widget code in widgets.php file function right_sidebar_widget() { register_sidebar( array( 'name' => 'Right Siderbar', 'id' => 'right-siderbar', ...
0
votes
1answer
34 views

How do I get shortcode, widget and template tag CSS to load in the head only as required? [duplicate]

I have a shortcode, widget and template tag that need to load CSS. I am registering in init, and enqueueing as required. The only problem is, it is adding the CSS loader at the bottom of the page, ...
0
votes
0answers
11 views

Retrieve the real time widget area class

I'm trying to retrieve programmatically the sidebars classes in my developed pluging. I use the global $GLOBALS['wp_registered_sidebars'][1] and try to access the 4th element(class) in the array but I ...
1
vote
1answer
18 views

WordPress widget / plugin…fields not appearing in my widget

Trying to create my first plugin. A simple one. It's doing mainly what I want to do except the widget itself in Appearance-->Widgets doesn't display my fields. Wondering if anyone could point me in ...
-1
votes
0answers
17 views

How do I add testimonial image to testimonial widget for Spacious theme?

I have a website with the Spacious Wordpress them installed on it. The website is www.PlanetReputation.com. At the bottom of the homepage you can see some testimonials that I have added using the ...
0
votes
0answers
12 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
19 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
13 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
9 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 ...
2
votes
1answer
42 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
21 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
16 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
25 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
10 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
91 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
11 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
17 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
23 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
38 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
20 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
31 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
20 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
11 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
8 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
16 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
42 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
25 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
14 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
35 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
19 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
22 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
22 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
54 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
12 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
28 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 ...