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

learn more… | top users | synonyms (2)

1
vote
1answer
58 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 ...
1
vote
2answers
30 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
34 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
51 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 ...
0
votes
0answers
23 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
16 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
26 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
16 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 ...
0
votes
2answers
21 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: ...
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 ...
1
vote
1answer
75 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 ...
3
votes
1answer
44 views

Ban certain widgets from certain sidebars

I have several sidebars in the theme I'm developing. Some of them are designed to hold only a few widget types. So I'm trying to figure out how to keep other widgets out without using a plugin. After ...
0
votes
1answer
130 views

Change Woocommerce Product Categories Widget 'Title' based on Product Category

I'm looking for a way to change the widget title of Woocommerce Product Categories Widget based on the category I'm viewing. Category 1 -----> Display Title of Widget for Category 1 - Sub ...
0
votes
1answer
26 views

Is there a way to use get_sidebar() when no widgets are activated?

WP version 4.4.2, I have a customized sidebar.php and no widgets activated, which automatically prohibits get_sidebar() function to load contents of sidebar.php. Is there a way to forcefully load ...
3
votes
1answer
129 views

Display all posts with same title

I'm trying to display in a sidebar php widget, all posts with same post_title in a specific category. I find this code on internet but don't how to use it Thanks for your help. function ...
0
votes
0answers
45 views

Refresh the Customizers preview after editing fields

I'm using ACF fields on a few custom widgets. While using the Customizer to edit fields, they will save on change but the preview will not refresh. Calling wp.customize.previewer.refresh() will ...
0
votes
1answer
55 views

Non-static method error when trying to use class in widgets

I'm trying to call a method into a function widget. The $this of the widget is passed to that method, but I get the following error: Strict Standards: Non-static method class_name::method_name() ...
0
votes
1answer
29 views

Check if widget has content

I just need to check, if sidebar has any content My functions.phpcode is below. function aspirationas_extra_widget_1_init() { register_sidebar(array( 'name' => __('Extra Widget 1', '...
-4
votes
1answer
44 views

Slider widget not displaying the caption for images

Here is my code for the slider.The place for a caption will appear blank above the image. <div class="slide-caption"> <div class="slide-data"> <a href="<?php // ...
0
votes
0answers
35 views

How to add a dynamic image as a widget in dashboard

I'm trying to add an image as a widget on the dashboard screen like this: This is an ads image, which will be seen only by users with read role and that too will be changed every month. Already I ...
0
votes
1answer
73 views

Check if the current shortcode is being used in a widget

How can I check if the current shortcode is being used in a widget? I need to disable some shortcode options that are not allowed in a widget. Someone know how?
0
votes
0answers
132 views

Widget Text - how to get the content with the_widget function?

I added some text with a title called 'Follow Me' in my WP text widget and I want to get this text by using WP code, so I following this guide: the_widget( 'WP_Widget_Text' ); But nothing is being ...
-2
votes
1answer
22 views

Keeping shortcode-generated widget and theme element in one line [closed]

I set up a playground site PlaygroundSite and I am trying to put Polylang language changer widget in the same line as linked-in icon. Because ascent theme does not contain a widget/sidebar area there,...
0
votes
1answer
50 views

Widget to embed youtube video

I am new to WordPress development. Currently I am trying to make an widget to embed video from youtube. My plan is an admin or an author will just give the video id and the video will be in widget ...
0
votes
1answer
23 views

retrieve custom post image through widget

My custom post has featured image. I need to retrieve it through widget. I am using get_the_post_thumbnail. But it is not working. Except this the rest of the widget is working fine. Here is the ...
0
votes
0answers
20 views

Widget form is not saving value that retrieved based on taxonomy terms

Custom Post Type: employee Taxonomy: department Here is the code:for widget form function form( $instance ) { // Output admin widget options form if ( post_type_exists( 'employee' ) )...
1
vote
0answers
22 views

Add visual editor style only on widgets.php page

I'm attempting to add a visual editor style with the function add_editor_style('visual-editor.css');, but only on the widgets admin' page, and not on post editor screens. I'm using a visual editor ...
0
votes
0answers
16 views

Check over a small apply button widget I have made for WP Job Manager

I have made a small widget that displays the apply button in the page sidebar. I am still quite new to WordPress widget development and am wondering if somebody would be kind enough to have a look ...
0
votes
0answers
21 views

taxonomy terms are not retrieving

My custom post is "employee" Its taxonomy is "department" I made a widget for showing taxonomy terms. but it is not working. What did I miss? class Employee extends WP_Widget { function ...
0
votes
1answer
69 views

How to add first and last CSS class for Woocommerce layered nav widgets

I need to add first and last ccs class for woocommerce_layered_nav widgets. // Add "first" and "last" CSS classes to woocommerce_layered_nav widgets function widget_layered_nav_first_last_classes( $...
0
votes
1answer
115 views

How to get post category list as select in front-end?

I use widget plugin Getting the random post & URL via ajax. I want to add function, that allows users on frontend choose category, and than display random posts from this category. function ...
1
vote
1answer
450 views

Widgets not working in Customizr but working in Appearance

I'm having some trouble with my widgets. I've registered widget areas correctly; as the widgets are showing up in the "Appearance" menu. However widgets aren't showing up in the Customizr section of ...
2
votes
0answers
53 views

iris color picker in widget - click event doesn't fire when initially when widget is first created

I added the wordpress(iris) color picker to a widget, and the color picker is not clickable when the widget is first created. My guess is that it's where/how the javascript file is being enqueued, but ...
1
vote
2answers
59 views

Sidebar not show customizer!

It's showing widgets.php: Not showing customizer: sidebar.php function footer_sidebar() { register_sidebar( array( 'name' => __( 'Footer Sidebar 1', 'footer1' ), ...
2
votes
1answer
64 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
1answer
155 views

Multiple rows of footer widget areas

I have a function on my functions.php that adds a bootstrap col class to the footer sidebars depending on the number of active sidebars. What I intend to achieve with this is having footer widgets ...
0
votes
0answers
39 views

How to hide default sidebar widgets?

I'd like to hide/not display all default widgets(Search, Recent Posts, Recent Comments, Archive, Categories and Meta) which are inserted into custom sidebar when the theme is installed. (Removing them ...
1
vote
1answer
24 views

Create an extra Widget Areas in WordPress TwentyTwelve

I'm new to wordpress and it's difficult for me to find some basic information in forums and documentation. I'm trying to create my own widget areas, and place my widgets there in administration panel....
1
vote
0answers
37 views

Input in plugin widget does not allow spaces

I'm developing a plugin for a client which allows keeping records of reservations to their hotel, and it has a widget which allows clients to make reservations. However, for some reason one of the ...
1
vote
2answers
25 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 ...
-4
votes
2answers
35 views

Content expands beyond its column container [closed]

everyone! I was wondering if anyone would be able to tell me how the content in my center column is able to expand its allowed container size and push my right column/widget area to the bottom? Here'...
0
votes
1answer
161 views

How to add WooCommerce Add to Cart button in widget?

How can I add a separate WooCommerce widget, with the Add to Cart button and its options, so I can display it anywhere in the sidebar of the product details page?
1
vote
0answers
38 views

Widget Logic use with Custom Taxonomy

I am using Widget Logic and attempting to use the new WPAdverts plugin to display classified ads. They use a custom taxonomy of taxonomy=advert_category&post_type=advert. I'm trying to display a ...
1
vote
0answers
27 views

Adding a widget function into the php theme file

I am using the following plugin - widget No Cache AJAX Widgets to display on the sidebar a feed of rss news that is created dynamically and bypassing the cache function. In updating the site we wish ...
0
votes
2answers
78 views

Where to add a widget class?

Where do we add our custom widget? I keep on getting internal errors, I tried to add the class in wp_content > plugins, or wp_includes > widgets, but I get an internal error. The class is simple, ...
1
vote
0answers
10 views

Unable to edit the “customize” section and the “widget” section is populating unknown code

My WordPress site is experiencing some major issues. I am getting a 500 server error when attempting to change the "customize" side bar, and the "widget" section is acting really weird (populating ...
2
votes
2answers
99 views

WP available widget for certain area

After searching under the tag widget and Google the closest I have found that populates what I am looking for is this article: Is there a way to allow only certain type of widgets in the sidebars? I ...
0
votes
0answers
13 views

Widget that allows image selection

I'm trying to develop a widget that allows the user to select an image to display on said widget. Right now, i'm getting the image from the library and displaying it's thumbnail on the widget's ...
1
vote
0answers
11 views

Custom Widget form function common elements

I am writing a set of custom widgets, all of which share a common 18 lines of code in the form() function, which looks like this: <div class="common-section"> <input type="hidden" class="...