Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
11 views

How to generate a widget form from an array with accordions/groups and save each value to array?

I created simple php class to generate fields in the widget form from an array. I don't know how to generate fields in the sections/groups and save it. Any advice and suggestions will be greatly ...
0
votes
1answer
8 views

Priority call methods - PHPMailer->addAddress(NULL)

I am currently making a WP widget and I am stuck with this. I want to pass a variable $emailReceiver from my form() method to my deliver_mail() method. The problem is that my deliver_mail() method ...
0
votes
0answers
9 views

how to use a sidebar widget with its options in a template

I know that the title of this question is a litle confusing, but this the problem I have recently installed a widget called Youtube Channel Gallery, which displays the latest videos on my website. ...
0
votes
1answer
19 views

Add a class to a dynamic sidebar's wrapper

I am making a plugin to display featured pages of a site, but it depends on a flex container and i cannot assure that a user's sidebar is going to have a display of flex. However, looking for ...
0
votes
0answers
16 views

Add Row to Footer to display more widgets

I want to display the widgets I have created on function.php file in WordPress. This is my footer.php file code believe the problem is here </div> <!-- Page content::END --> <?php ...
0
votes
1answer
14 views

How to check if you are on widget.php page?

I am trying to write a widget and I need to add the color picker to my widget form. I want to add the script only on widget.php page and not on all the admin pages. Is there a way that I can detect ...
1
vote
0answers
14 views

WP - Genesis - How to get the content of a widget in php? [closed]

Provided I have a widget area that I register in genesis like this: genesis_register_sidebar( array( 'id' => 'my_header', 'name' => __( 'Image Header', 'my_header' ), '...
-1
votes
0answers
11 views

Widgets in Menu for Wordpress not working

I'm using the Widgets in Menu for Wordpress plugin, but it doesn't appear to work correctly. When I click on Appearance → Menus, a Widgets meta box should appear, but it does not show up. How can ...
0
votes
1answer
18 views

I need to edit a widget, with no dashboard access

What the title says. There's a widget on a website that I need to edit, but I only have ftp access. I've tried everything to try and locate where the template is for the specific widget I'm trying to ...
0
votes
0answers
14 views

Combining Widgets

I'm building a woocommerce page for a client, which obviously features event/product creation. now i want to clean the admin dashboard up for him, so that it looks and feels the way he is comfortable ...
0
votes
0answers
13 views

How to randomized order of widgets inside the page content area of the homepage?

I have a wp plugin installed called siteorigin page builder, which has a layout builder where i can add a bunch of widgets inside the content area of my page. How can I make it that every time my ...
3
votes
1answer
59 views

How to avoid widgets added to sidebar on theme activation?

I am registering 3 sidebars on widgets_init register_sidebar(array( 'name' => esc_html__('Left Sidebar','creatus'), 'id' => 'left', 'before_widget' => '<div ...
2
votes
3answers
112 views

Defer Code in Widgets - Page Speed

How to UP Page Speed With Widget Defer? Is there a way to defer a widget in the footer? I have an external API in a footer widget which is slowing down my page. It is not needed until the page is ...
0
votes
0answers
13 views

Manual add widget are not showing live preview icon [duplicate]

I am all ready add custom widget in my theme.. But custom widget are not showing live preview icon.. Others default worppress sidebar widget are showing live preview icon
0
votes
2answers
31 views

Displaying a WordPress widget by name

I've registered a widget register_widget('Education_Work'); Now can I call a widget by registered name? Is it possible ? dynamic_sidebar('home-1'); // don't need this I want something like ...
0
votes
0answers
6 views

Where to find the widgets at the bottom of my homepage?

I had initially installed a subscribe plugin. There are two widgets at the bottom of my page as in the image. I want to remove subscribe from the bottom. If I go to the widgets section in my ...
0
votes
0answers
6 views

df-draggable save position after reload

I have a question about the df-draggable plugin. How I can save the position after move and reload on page? I'm really desperate :/ I would like the widgets movable and the position save. The Plugin:...
0
votes
0answers
16 views

Widget PHP code isn't working

So I have a custom post type, and a php code widget that is connect to said post type and updates every time there is a new post in that type, but it's supposed to redirect when the display on the ...
0
votes
0answers
11 views

Where to manage the settings for a custom plug-in widget?

I successfully followed the instructions at https://kinsta.com/blog/create-wordpress-widget/ and got my custom widget to show-up in the list of plug-ins in a local instance of Wordpress, and was even ...
2
votes
3answers
29 views

Show Specific Footer Widget for Specific Pages

I registered a new footer widget with this code. register_sidebar(array( 'name' => esc_html__( 'Footer Sidebarprestige', 'realtor' ), 'id' => 'footer-sidebarprestige', 'description' => ...
1
vote
0answers
16 views

How to remove traces from widget during uninstallation

I have a small plugin, which registers a custom widget and now I am wondering how to remove all traces of this widget when the plugin is removed through the administration. If I look in the database ...
0
votes
0answers
15 views

How do I keep children of certain parent menus expanded by default on a sidebar?

We are using advanced sidebar pages menu: https://wordpress.org/plugins/advanced-sidebar-menu/ to expand / collapse children menus on a sidebar. By default, the parent sidebar menu is expanded, ...
0
votes
1answer
134 views

Change The Woocommerce Product Categories Dropdown Widget Placeholder Text

I've searched everywhere on the internet and tried to code it myself I want to change the default "Select A Category" placeholder text to "Select A Sub Category" so far I have tried this but it's not ...
0
votes
0answers
25 views

Recent posts widget : how to display only the posts of the current subcategory or category?

I would like to display only TOP 5 latest post from current grandchild (sub-sub category) as my widget. If post have have category + subcategory + sub-subcategory then show only latest post from that ...
0
votes
1answer
31 views

Read file contents the WP way

I'm developing a sidebar widget. I need to read a txt file in a particular directory of the website. I can do it with file_get_contents or readfile PHP functions, but what's the best way to safely do ...
0
votes
2answers
31 views

My theme didn't appear sidebar area

I tried to customize my WordPress theme but it shows this error. Your theme has 2 widget areas, but this particular page doesn’t display them. You can navigate to other pages on your site while ...
0
votes
2answers
28 views

Adding pagination to my theme [closed]

I would like to add a pagination to my wordpress theme. However, for me it is not so easy because my theme is built from the plugin "AT Posts Column", which displays the latest posts on the main page. ...
0
votes
1answer
13 views

Search transients through widget

I have a certain amount of data stored in a transient through a custom developed plugin ( just for this one website ). The transient contains one big array of data that I get from an external API. The ...
0
votes
0answers
24 views

how to add load more or pagination to recent post widget

i use "recent posts Widget With Thumbnails" plugin. this plugin not have any pagination or load more. please someon tell step by step what can do to add load more to this plugin. thanks
-1
votes
1answer
21 views

Can't edit Contact Us form on front page

I can edit everything on the homepage except the Contact Us form. It is not a gravity form listed in our list of forms, and it is not a contact form 7 plug in. It is not a sidebar. I cannot get to it ...
0
votes
0answers
12 views

Display one category with a widget

Hi I'm using WooCommerce for my website. I want to display one product's category with a widget. But all widget display every product's categories. Is there a way to filter the categories I want to ...
0
votes
0answers
9 views

Widget Specifc Issue - Browser holding value that wasn't saved?

This seems to be an issue in other widgets as well. My widget has a pulldown. Two options. If I change the option and hit "save", it saves and if I reload the page, the saved value is selected ...
0
votes
0answers
23 views

Widget settings disappear after refresh

I'm developing my own WP theme. But i have a problem with widgets. So , when i drag and drop widget to sidebar area , it's settings don't appear. Appears only after refresh page. But at the other ...
0
votes
1answer
21 views

How to register a widget when saving a post?

I've tried to solve my problem in the simplest way, but it doesn't work: why? function createNewWidgetSavingAPost($post_id) { add_action( 'widgets_init', function(){ $...
0
votes
0answers
32 views

How to add <li> tag to WordPress tag cloud widget?

Initially, the tag cloud is in <div> tag, which I have changed to <ul> tag. Now for each tags, I want to place the tags inside <li> tags. How can I do that?
0
votes
1answer
69 views

Problem with saving checkbox values with WordPress Widget API

I'm trying to learn WordPress Widget API. Everything looks great, except for the checkbox controls. Also, the checked() function puzzles me a bit, I'm confused about what value to propose if I have to ...
1
vote
0answers
30 views

Help With Custom Image and Text Widget

I recently got into making a custom WordPress theme and I've learned a lot along the way, but I've hit a roadblock with making a custom widget.This is the basic output HTML I'd like my widget to ...
1
vote
1answer
22 views

Widget changes in customizer ajax error to many options?

Just testing frontend widget changes via customizer and I am not even able to change the title. Ajax response says {"success":false,"data":"widget_setting_too_many_options"} There is also a notice ...
1
vote
1answer
28 views

How to make my custom widget appear within WordPress widgets? Plugin development

This is my first WordPress plugin ever, so i'm a little noob. But why is my widget not showing within all the other widgets in my WP-Admin interface? It should be visible when i activate the plugin. ...
0
votes
1answer
35 views

Show only sidebar if widgets have content on the current page

I have a sidebar in WooCommerce showing sub categories with the "Product categories" widget. However when a category has no subcategories I wan't the sidebar to be hidden. is_active_sidebar is only ...
0
votes
1answer
9 views

How to narrow the area between buttons on Helium theme sidebar? [closed]

I have WordPress based site. I used Helium theme and added a sidebar. On this sidebar, I added a few buttons from SiteOrigin widgets plugin. The buttons are being spaced between them automatically, ...
0
votes
1answer
97 views

display a widget on specific category and its sub categories

I'm not good at wordpress coding. but i want to display a widget on specific category with its sub categories and all child posts. Is there any simple way for this purpose ? I found out the "Widget ...
0
votes
1answer
39 views

Multiple selection for wordpress widget

I created my own category selection widget. So i used <select> but i want to use with multiple attribute. Here is my widget class. It works perfect without multiple attr. But i want to use it. ...
4
votes
1answer
72 views

How to build widget with arrays inside arrays?

I've started building a widget that needs to have an array inside an array. I'm trying to get the widget to have the ability to create multiple elements that will display on the site, but also has ...
0
votes
0answers
34 views

Get the $instance variable inside the widget __construct function

i am tring grab the $instance varible inside the __construct function of a widget. i need this so i can create a dynamic widget name I tried: printing out the $instance Printing out $this ...
0
votes
1answer
30 views

How to add urls in html widget in a gravity form? [closed]

I am using gravity forms for my website. I added a html widget to add some text and urls to link to other pages of the site. Code: <div name="comments" id="comments" style="...
0
votes
0answers
26 views

How do I replace the images URL in widgets?

I wrote the script below to replace the URL of the images in the post content with the WordPress CDN link. (Yes, I know the Jetpack, but in my case I can not use it) <?php add_filter('the_content',...
0
votes
0answers
24 views

Changing Custom HTML Widget into Tab. Using AJAX?

Not sure if this is appropriate or not, but I'm kinda lost on what to do here. Need some advice and clarification. So, at this site http://iceiceicy.com/wingwah/, I've created a Custom HTML Widget (...
1
vote
0answers
29 views

get widget number from array dynamically

I have widget data in var $data = get_option('widget_as_about_me_widget') The widget number is 5. How to get widget number dynamically from this array? array(2) { [5]=> array(56) { ["...
0
votes
0answers
18 views

wordpress calendar wiget the datebox according the color category

i want to ask suggest about plugin , i want plugin the calendar widget (mini calendar) which is the datebox color calendar is according the category example if the category public holiday then ...