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

Questions tagged [widgets]

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

0
votes
0answers
9 views

(Avada Theme) Hiding menu items not currently active in sliding bar widget

I recently setup a sliding bar option to have a vertical menu fly in that slides from the right when you click the plus sign. The question / problem is that all the menus are currently being listed ...
0
votes
0answers
15 views

Menu and widgets not showing on frontpage

Yesterday I amended a certain widget, but now all widgets AND menu AND footer doesn't show up anymore on my frontpage. I do not have this issue on the other pages. In meantime I have deleted this ...
1
vote
0answers
8 views

Conditional Tags Based on Previously Viewed Posts

I was looking at the Conditional Tags Archive and was wondering if it's possible to show a widget depending on different posts / pages a visitor has previously viewed. For example, if I had a car ...
0
votes
0answers
14 views

Add fields to the top of widgets form

i have read this and create custom fields : How to add Custom Fields to Settings in Widget Options for all Registered Widgets? but i want to add this custom fields to the top of all other fields . (...
0
votes
0answers
12 views

How do I edit WordPress widgets?

I want to add title and alt attributes to links in the WordPress tag cloud widget but I don't know what to do. Can someone help with this? I've looked at the /wp-includes/widgets/class-wp-widget-tag-...
0
votes
0answers
16 views

Showing siteorigin widget on category page view

I am using the plugin Page Builder by SiteOrigin and I am modifying my category page to render a snippet of one of my custom widgets inside the single view. How would i render just a specific widget ...
0
votes
1answer
17 views

How create a certain widget-area on homepage with genesis-child-theme [on hold]

I'm using 'lifestyle pro' genesis child theme. It offers widget-areas on homepage: Home Top Home Middle Home Bottom Left | Right In the past I put post-excerpts into 'Home Bottom Left | Right', and ...
0
votes
0answers
15 views

Siderbar implementation with collapsible bootstrap cards

I'm trying to implement collapsible Bootstrap 4 cards on sidebar widgets, until now I have this: register_sidebar( array( 'name' => esc_html__( 'New Sidebar', 'ns' ), ...
0
votes
1answer
20 views

Loop through Widgets in sidebar using widget array number?

Loop through widgets in sidebar This function from @birgire is almost perfect for me, but how do I call it using the sidebar array as the second parameter, rather than the widget ID. In his example, ...
0
votes
1answer
23 views

How to display products in sidebar in 2 columns?

I would like to put products view to sidebar on each blog page. However, it prints 3 columns by default which does not really look nice: I tried these approaches: 1) Editing functions.php of my ...
0
votes
1answer
20 views

How to create a wordpress widget that dynamically changes according to the page

I am creating a plugin in which my custom sidebar widget changes content depending on the page it is loading on. One way to do this is // Register and load the widget function custom_register_widget()...
0
votes
0answers
12 views

Input Options for users in widgets section

I am learning to create a widget in a WordPress. I learnt how to create inputs in which user will enter data using dashboard and how to show the data on the front end. But I got stuck when I thought ...
-1
votes
2answers
39 views

Can't use is_home in template-functions.php

I'm trying to load a slider in my header, but only on the homepage. I'm using The Ultralight template if that helps. I'm trying to (in template-functions.php) do the following: <?php if ( ...
0
votes
0answers
16 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
12 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
10 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
20 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
20 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
16 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' ), '...
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
115 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
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
31 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
17 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
182 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
27 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
39 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
33 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
32 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
29 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
25 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
22 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
36 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
71 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
34 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
29 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. ...