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

learn more… | top users | synonyms (2)

0
votes
0answers
17 views

Text field wont accept/save iframe

I'm editing one theme (using job manager) and I added a new text field and function which outputs the same. If I enter just text the same appears but I need this to be done so videos can be shown on ...
2
votes
1answer
59 views

How can I reuse the Wordpress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it ...
0
votes
0answers
13 views

How to remove extra space from li of wordpress widget?

I am building a some WordPress widgets. During this I am facing some problems. When I am using <ul> <li> then my layout taking some margin or padding, but when I am using <td> or ...
1
vote
1answer
23 views

How can I apply css styling to the current day in the calendar widget

How can I apply css styling to the current day in the calendar widget? It seems there is no css class for the current day.
0
votes
4answers
607 views

WAMP to XAMPP WordPress transfer

I want to switch a WordPress site from a wamp localhost to xampp localhost. Using the Tools > Export, I saved the WordPress content to an XML file. I did not create a similar backup of the MySQL ...
-4
votes
1answer
41 views

Widget won't work due to old JavaScript? Any ideas how to make it work? [closed]

I was trying to add this widget to my blog <!--BEGIN PROFILE WIDGET--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" ...
-3
votes
1answer
16 views

Subscribe to newsletter widget [closed]

I need to add a simple widget for visitors to subscribe to the newsletter. Which one would you recommend?
0
votes
1answer
27 views

display widget checkbox selection on frontend

I create a widget for a custom post type that will display a list of post in the widget area. it works fine, i can select multiple posts and save the widget but i can not get it to display on the ...
0
votes
2answers
1k views

How to retrive widget title/data

I'm using this code to display widgets of certain sidebar: $sidebar_id = 'sidebar1'; $sidebars_widgets = wp_get_sidebars_widgets(); $widget_ids = $sidebars_widgets[$sidebar_id]; foreach( ...
0
votes
1answer
16 views

Widget settings disappear after refreshing page

I am developing a plugin that displays your average Google My Business rating in a widget. Everything works fine, except when I close the widgets page and return to it later (or do a plain refresh) I ...
0
votes
2answers
504 views

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

I am running into a problem where I have no idea where to add in a description so it will show up on the widget dashboard. It just keeps displaying the title. Something else I would love some help ...
0
votes
2answers
2k views

Current theme broken - after server and domain migration

I'm migrating a Wordpress install and trying to get down the correct process for doing so. I've tried using the method I thought would work, but it didn't. My files and database are in place, but ...
3
votes
1answer
77 views

How to get the registered sidebar's name by its id?

Let's say I have this code in my "functions.php": function mytheme_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar Name', 'mytheme' ), 'id' ...
0
votes
0answers
8 views

Widget not notifying customizer of changed value when updated via Javascript

I'm developing a wordpress theme that relies heavily on widgets for flexibility. I'd like to use the wp media javascript library to add images to some of these widgets instead of just having a text ...
0
votes
0answers
10 views

Can't display tag cloud by widget

I want to display tag cloud products and to use the widget of woocommerce - Tags products. Tags isn't displayed even though they are added to the 90% of the products. Tested on other sites and work ...
0
votes
3answers
572 views

Display widget outside sidebar?

I want to display a widget outside the sidebar, but I can't get my code to work. The theme name is radius-primary-sidebar and my widget id is text-20 (according to the html in the admin page. See ...
4
votes
1answer
75 views

Updating to Version 4.5 bumped my “main sidebar” widget out of place

I updated to the newest version of word press and it changed my home screen. Essentially it shifted my text to the right and as a result shifted my "main sidebar" widget downward to now begin below ...
0
votes
1answer
857 views

Multiple entries in get_option results? or why is _multiwidget set to 1?

I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some ...
1
vote
0answers
15 views

How to use a dropdown to populate a list of post from CPT

I've created a widget that displays the latest posts from a dropdown of all the blog post types. I want to add an option for the user to choose a single post to be displayed as featured. I would like ...
1
vote
1answer
46 views

I can't get my custom widget area to show on my Wordpress site

I can't get my sidebar to appear on my site. I add a widget section since there wasn't any: function.php <?php if (function_exists('register_sidebar')) // Area 1 register_sidebar( array ( ...
0
votes
2answers
285 views

widgets_init actions not fired from functions.php's child theme

I need to add new sidebars for using them accordingly on different pages throughout my shop. I use Woocommerce and my own Storefront child theme. This is a snippet of what is in functions.php file ...
12
votes
3answers
1k views

Conditionally enqueue a widget's script/stylesheet in HEAD (only when present on page!)

I've been trying to load scripts and styles for a WordPress widget with the following conditions... The scripts MUST load in the HEAD (else they break). The scripts must ONLY load when the widget ...
0
votes
0answers
20 views

Custom file with special code of category widget

Is any way to define custom code/file of standard class-wp-widget-categories.php for my theme? In standard WP class-wp-widget-categories.php list is printed in simple <ul> tag. I need to add ...
0
votes
1answer
1k views

How to echo Widget Title in Custom Frontend-Template Box

I've created a custom Widget with the help of following code: // Creating the widget class wpb_widget extends WP_Widget { function __construct() { parent::__construct( // Base ID of ...
1
vote
5answers
3k views

Widgets not displaying in theme customizer

I am developing a new theme and I am using several sidebars in this theme. All works fine, but the widgets are not showing up in the theme customizer section. All widgets are working fine under ...
1
vote
2answers
16 views

Create a widget to use shortcode?

I have a plugin (Social Warfare) that I love. But, there's no widget available. What is involved in creating a widget so that I can use the shortcode that seems to work fine on the pages and posts?
0
votes
2answers
977 views

Change HTML structure for custom menu in sidebar

I've been digging for documentation on how to change HTML output for the "Custom menu" which you place in optional widget. So its clear what I meen I have attached an image of the widget block here: ...
0
votes
1answer
34 views

How can I delete a wordpress widget instance?

I am working on a WordPress plugin to insert advertisements.Its also having a widget to show the ads.In my main plugin class I want to check for a condition and if it satisfies I want to delete a ...
0
votes
1answer
520 views

“Widgets” menu doesn't appear

I'm developing a WordPress theme, which works great on my localhost and one of my live servers, but on my other live server the Widgets menu (from Appearance) doesn't appear. And yes, all 3 servers ...
1
vote
1answer
773 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 ...
0
votes
2answers
753 views

Widget Option is Missing

My Widget Option is missing in the Dashboard area. How can i make that appear? I have downloaded this Blank Theme from Chris Coyiers site. sidebar.php <?php /** * @package WordPress * ...
0
votes
1answer
19 views

Conditionally Load a Script if a Certain Widget is Shown on a Page

I know this question has been asked in the past but the accepted answer is incorrect. is_active_widget returns true if the widget is registered on the site. I.e., it was dragged to the right in ...
0
votes
1answer
2k views

Sticky menu for WP custom menubars

This seems simple, except that I am not able to figure it out. In a wordpress theme, how can I make a custom menubar below the header image stick at the top after scrolling down the page? Example ...
0
votes
2answers
1k views

Unable to load “wpColorPicker” on theme customize page

Whether I'm using a Wordpress default theme or a custom one, I see the JS error: Uncaught TypeError: Object [object Object] has no method 'wpColorPicker' when I click "Customize" on the theme. I've ...
1
vote
1answer
50 views

How to add #navbar to all page links?

I have several Wordpress websites with large images at their tops, using 2013 child theme. How to add #navbar anchor to all page links, so that the browser scrolls down a bit, when a user clicks a ...
0
votes
1answer
19 views

widget should display post archive by year and on click also by month

I want to display the post archives like seen in this picture. Shown by year and on click it should open up the months. I am not sure how to approach this, would you customize the standard WordPress ...
0
votes
1answer
23 views

Enabled checkbox by default in WordPress widgets

The code works as expected. The issue happens if I set 'show_post_count' => 1 by default. In this case checkbox will be enabled always. How should I update the code to work as expected even if ...
0
votes
1answer
45 views

Creating widget - ask for selecting a post in the admin panel

First of all, sorry for my English, I'll try to make it understandable. I'm new on WordPress; I already have created a few plugins but they didn't needed admin configuration. Now I'd like to make an ...
9
votes
1answer
3k views

Adding Widget form fields dynamically

I am trying to add form field to a WordPress widget dynamically. So if the user want to add another date to an event they can click a button to get more fields. The question is: How do save newly ...
6
votes
3answers
4k views

Add the sidebar/widget editor to the post edit screen?

There are (among others) two common ways of customizing the sidebar on an individual post: Create a new sidebar for the post, using code or plugins like Custom sidebars, WP Custom Sidebar, Per Page ...
0
votes
0answers
20 views

Advanced Custom Field in dashboard

I'm looking for a way to add a dashboard widget that has a ACF text and image field in it. I want a client to be able to quickly update a text field right from the dashboard. Any ideas on how to ...
0
votes
0answers
15 views

Edit recent post widget

Is possible to add featured image from post to widget area too, for only 1st post, if yes please advise Like this site: http://postimg.org/image/etwxba4nz/ I have asked the theme author, he's answer ...
0
votes
1answer
24 views

How to check widget-cpt meta and display its custom css in the head?

When dealing with a widget that is a custom post type, is there a way to detect when that widget is displayed, then check its post meta for any custom css and enqueue it in the head of the site? ...
0
votes
0answers
15 views

Handling dozens of sidebars

We have the job to realize a page with custom sidebars. Sidebars can be created on the fly on post an page edit screens, to add a custom sidebar on each page. The client wants to use this to add ...
3
votes
2answers
781 views

Full width layout for custom post type pages

I'm trying to remove a widget area called 'Primary' from a certain page on a site. This is the function where I manage the sidebars: //ADD CATEGORIES IN SIDEBAR OF SINGLE POST TYPE add_action( ...
1
vote
2answers
23 views

How to conditionally display widgetized areas in theme customizer?

On my client's site there will be quite a few widgetised areas - one for each page created plus global ones. The problem is that they all display in the "widgets" section in theme customizer at the ...
0
votes
2answers
19 views

Use customizer or sidebar for header settings?

I'm converting html into Wordpress theme. In the header I have a tel number and a button. Both are links, but styled differently. Do you think it would be better to make them a sidebar (widget area) ...
0
votes
1answer
27 views

Repeated Output in Widget

I'm encountering an odd issue with a simple custom widget that I made to show contact info in a widget. For some reason when I add a phone number it's repeated multiple times as you can see here: ...
1
vote
1answer
50 views

Remove rss widget title link

I'm looking to remove the link and icon from rss feed widget. Is there a way it can be done? Obviously I don't want to modify the core files. So desired output is: <h3 class="widget-title">RSS ...
0
votes
0answers
18 views

In need of help with a “Notes” section

I am in the process of developing an educational website where each post is a topic of information or a "Module". I would like to give our students the ability to write down quick notes and items to ...