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

learn more… | top users | synonyms (2)

0
votes
1answer
8 views

Add drop down to widget if it is in a certain area

Is there a way to programmatically add a dropdown selector to any widget added to a given widget area? I have a header widget area and I'd like any widget added to it to have a dropdown box with the ...
0
votes
0answers
9 views

How can I move the Woocommerce Sort button to a widget in the Shop Sidebar?

How can I move the Woocommerce Sort button to a widget in the Shop Sidebar? I don't see any options to do this even within plugins, which is confusing to me. It seems a great place to have it - above ...
0
votes
0answers
14 views

Trouble with Dynamic Input on Widget, Unable to get Widget ID

I'm trying to create Widget with dynamic input as the widget options. The Option fields are Feature (text), Price (text), and Picture (Text with upload button). For some reason, I couldn't get the ...
4
votes
1answer
59 views

can require “themefolder/includes/widgets.php” in “themefolder/functions.php” yet widgets.php doesn't run

In order to keep things clean I use functions.php almost solely to require other files. As such part of functions.php looks like this: #include types require("includes/types.php"); #include ...
0
votes
1answer
49 views

Widgets in WP 4.3 disappearing - How to fix?

I definded my widgets as seen in the following code. Since update 4.3 Wordpress did some changes i can not fix. Any ideas what i need to change in order to see the widget in the frontend again? I can ...
1
vote
0answers
57 views

Widgets not displaying since 4.3

I had some basic widgets registered and assigned to sidebars which were working prior to upgrading to WordPress 4.3. class Footer_Contact_Widget extends WP_Widget { public function __construct() ...
0
votes
0answers
6 views

How to replace a widget by editing it in the child theme?

I am fairly new to wordpress. I heard that changing a theme widget in the theme itself is not a good practise. I want to edit a certain widget by copying it into the child theme. The widget in the ...
0
votes
1answer
27 views

Nonce and widget

I've been screening the code of several widget and haven't found any one of them handling nonce. I also took a look at the WP_Widget class and found nothing about it as well. This is from the codex: ...
1
vote
1answer
10 views

Widget - link to page rather than absolute url

When I add a link in a Widget, I get the standard Insert/edit link dialog with a Search field. If I enter the Page in the Search field and then link to this page using the "Or link to existing ...
0
votes
1answer
16 views

Why can't I see “Widgets” in my Apperance menu?

So I am trying to create a widget-area. And after adding some code to the functions.php I noticed that I can not see "Widgets" in my menu. So I figured I had to add "widget support" to my theme so I ...
0
votes
1answer
31 views

display custom post type in widget aera

I am using https://wordpress.org/plugins/custom-post-type-ui/ plugin for custom post types. Now I need to display contact information in my footer area, email, phone num , address etc. For this I have ...
2
votes
5answers
303 views

WP_Widget deprecated error in Wordpress V4.3

This error only happened this morning as I updated my wordpress site to version 4.3. Two other sites on the same hosting ( and all using CPanel as an admin portal for the hosting) are not having any ...
0
votes
0answers
14 views

Are dashboard widget settings global?

I followed the example of how to create a create a dashboard widget from WordPress' site to make a widget that reads an RSS feed and displays the items (yeah I know there are plugins that do this but ...
0
votes
1answer
51 views

How to add image uploader to a custom widget?

I'v built a custom widget that will show some sport scores. Scores are added trough custom post. When i open new custom post(scores) i enter their team names, score, scores. Now i want to add an ...
0
votes
2answers
11 views

Redirect to page after a widget form submit

I have a widget form with custom fields like age,pincode etc.The submitted form data will be submitted through a 3rd party API which will output me JSON. Now I want to redirect to a page showing the ...
1
vote
3answers
258 views

Widget Admin - Form Submit Event?

I'm creating a widget, and cannot figure out how to get an event right before the person clicks "save" or presses the enter button on the widget admin panel. What would be the javascript code to get ...
0
votes
0answers
28 views

After wordpress widget save (ajax call) tinymce editor gone, data not saved

I have made tinymce editor for textarea fields in widgets. I'm enquing scripts: wp_enqueue_script('tinymce', home_url() . '/wp-includes/js/tinymce/tinymce.min.js'); wp_enqueue_script('tiny', ...
0
votes
1answer
16 views

Custom post type not being pulled in widget

I am creating a widget that displays data from my post type 'testimonials'. The back end of the widget is working fine and displays a list of testimonials and allows me to select which I want to ...
0
votes
0answers
7 views

Ensure widget admin js fires in Widgets and Customizer

Doing a long-overdue update of a plugin. I have some JS that loads in the admin side to react when a user changes a select value in the widget options. $('#accordion-panel-widgets, ...
-1
votes
1answer
49 views

How to completely remove the sidebar?

I am custermising adamos theme with the WordPress web tool. I went to Appearance ==> Widgets, and removed everything in Primary Sidebar. But I still see ARCHIVES and META at the position of right ...
0
votes
0answers
16 views

wp_dropdown_categories() in function form () doesnt work in page builder

I am creating my very fist widget which will show 5 post from certain category in a certain way on my wordpress site. I have main function ready with hardcoded category number in it and now I would ...
0
votes
1answer
33 views

Creating a widget with a number of custom fields

I am attempting to create some custom widgets. I have created one, which only needed a different title field. However I am now stuck when trying to create a widget which allows me to have multiple ...
0
votes
1answer
24 views

Plugin Works, but Widget Doesn't

I really haven't got a clue here. I've been busily developing a custom WordPress site, using custom plugins and widgets for some of the custom functionality, and I've hit a snag. No matter what I ...
0
votes
1answer
24 views

Wordpress Widget Not Saving Instance

I have very simple wordpress widget, that has 3 input field. Whenever i submit data, it does not save to database. I have added and deleted the plugin , deactivated and reactivated multiple times, but ...
0
votes
0answers
8 views

Can't access global scope in widgets

How to set global/static variable inside of a widget function of a widget? I use this code: class MY_Widget extends WP_Widget { function widget( $args, $instance ) { global $myvar; ...
0
votes
1answer
16 views

Even with PHP plugin get_posts not working in widget area

I have the following code in a template, it and displays images form a custom field: <ul class="about-us-grid"> <li> <?php $posts = ...
0
votes
0answers
17 views

Update the same widget in multiple sidebars

I have a fully functionnal widget with some inputs and I put this widget in a second sidebar. I want to know if it's possible to automatically update the second widget with all the informations ...
0
votes
2answers
11 views

in_category('category-sluga') returns true for Archive page of Category 'category-slugb'

I've got a Category Archive page with name category-slugb.php. I have a sidebar with some Widget Logic that uses in_category('category-sluga'). What's odd is that on this Category Archive page (i.e. ...
0
votes
0answers
15 views

Update title of every instance of widget using text field

I have created a simple widget which looks like this: As there are going to be many instances of this I want to know if it's possible to update the title of each instance (where it says 'Membership ...
1
vote
1answer
52 views

How can hide widget title if custom widget is empty

I created my Custom Widget with a category filter select. The widget show me the related posts of the current taxonomy term and filter by the selected category. I would like to hide the widget title ...
0
votes
1answer
30 views

how to run a php code in widget?

I have a code to get all taxonomies and terms for a single post: $object_terms = wp_get_object_terms($post->ID, 'staff', array('fields' => 'all')); if ($object_terms) { echo '<p>' . ...
0
votes
0answers
15 views

Modify default widgets

i want to add a class to the link inside the footer widgets. how can i do that ? I found a way to add a class to the widget it self but not to the link inside of it ! The concerned widget are ...
0
votes
0answers
6 views

How to add images to widget instance from backend

I am working on a project which has content(no posts) and I want to give complete control to user to change and edit content from admin panel. I have created widget added fields to it but I don't know ...
1
vote
1answer
25 views

How can i make WP_Query return post image and categories?

I have a sidebar widget that will display related posts based on a custom meta field. The query works, but its very wasteful. All i need is the post title, featured image and the categories of the ...
1
vote
1answer
82 views

Custom Widget Creating PHP Exception When Placed In Its Own PHP File

I have a custom plugin created and i have created a widget. At the moment this code is included in the base php file for the plugin and its working fine. I want to move the widget and all future ones ...
0
votes
0answers
10 views

WordPress returns incorrect timestamp in drip-feed widget

First off, yes I have contacted s2member support on this topic, but they have not been super helpful. Additionally, I'm not convinced this is an s2member plugin issue. Ok here goes: I'm working on a ...
0
votes
0answers
13 views

Get the sidebar title outside widget

I want to find a way to get the sidebar title outside of the widget area. My actual functions file: if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => __( ...
0
votes
1answer
36 views

Widgets Opening In New Window - Unwanted

I am dumbfounded as to why my sidebar image widgets are opening links in a new window when I do not have the "open link in new window/tab" checked off. The box is blank. My page is ...
0
votes
1answer
19 views

How to call theme default widget in custom template?

I have default widget available called "Recent Post" created by theme. I want to call that widget in my custom template which I made. I am trying in following way , But that is not working. ...
0
votes
0answers
8 views

Hooking into action that fires in wp_head from widget on front end [duplicate]

I have a custom action hook for which the do_action() is executed in a function that hooks into the wp_head action. I would like to run add_action() for that custom action hook from the front-end ...
0
votes
0answers
17 views

Theme Customizer not recognizing Widgets

First of - i do not know much coding, though i do learn quickly and am looking to get this issue sorted ASAP. I am sure it is something simple. When i load up my site in the Wordpress Theme ...
0
votes
1answer
42 views

How to Register and Display Widget for Custom taxonomy

I have registered a Custom Taxonomy Named as Album, Now i want to register and display a custom widget like category to display recent 'x' albums with thumbnail on my sidebar. Below is a piece of ...
2
votes
1answer
30 views

How to listen to color changes on the color picker?

I am trying to run some custom jquery function every time the colorpicker's color change. The colorpicker is include as part of the WP core. I have been looking at the JS code, but I can't figure out ...
-1
votes
1answer
46 views

How to show Wordpress Dashboard Widgets on Frontend?

I want to use Wordpress Dashboard Widgets as it is easy to add new widgets and automatically have the functionality of drag and drop, changing the order, showing and hiding widgets and also ...
0
votes
0answers
28 views

Change widget: categories to tags

I have a theme with a widget that displays posts from a category. How can I change it to tags? This is the code: /** * Plugin Name: Middle Buzz Widget */ add_action( 'widgets_init', ...
3
votes
1answer
50 views

Adding widgets programatically: how to avoid collisions?

I am developing a theme, and I'm trying to add widgets programatically to its sidebar. I read this excellent answer: http://wordpress.stackexchange.com/a/51086/14225 But there's one thing I'm not ...
0
votes
1answer
29 views

Twenty Fourteen: how do they populate by default the sidebar?

My question is pretty similar to this one: How can I insert default widgets when my theme is activated (similar to what twenty eleven does)? Except that it's for Twenty Fourteen. I'm trying to use ...
-1
votes
1answer
17 views

How do I insert a photo at the top of the sidebar?

http://www.beautybykatlin.com/ Hello, How do I add an image at the top of the sidebar? I had one there but I deleted it and I don't know how to get it back. Please help!!! Thank you!
0
votes
1answer
25 views

Adding inline styles from a widget

I'm working on a theme that has an optional widget to allow users to put some site elements where they want. One of those is a list of social media icons. These are font icons, so they can be styled ...
0
votes
1answer
46 views

using get_template_part() inside a widget and passing variables

I read that get_template_part() should only used by themes not plugins, I don't know if using it inside a widget function (created by the theme) is considered as a plugin or not. Anyway, I'm trying ...