Questions tagged [widgets]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

post count not reflecting pre_get_posts action

please can someone help me out! I'm using a plugin to create a widget for a custom post type archive which is showing in a sidebar. I then added a function to further filter the results using ...
0
votes
1answer
9 views

Removing a widget via theme editor

I recently updated our company's website and now we are seeing our newsletter sign-up widget appearing on landing pages where it previously had not. Our landing page template is set up to remove this ...
0
votes
0answers
9 views

Elementor adding unwanted divs on text editor widget [closed]

Good Day everyone! I have a problem with elementor's text editor widget as it automatically generates unwanted div codes. For example this one: That code is being automatically added by elementor text ...
0
votes
0answers
18 views

How would you return a value from an individual field in a custom widget?

I have built a handful of custom widgets on my site. In the main these are just fine how they are. But occassionally I also want to be able to use a field individually rather than the whole widget. ...
1
vote
1answer
17 views

Display the date before the post title in recent posts widget

In the recent posts widget I have the post link first, and the post date second item, How can I change, to display the date in front of the post title? Thank you. register_sidebar( array( '...
0
votes
0answers
8 views

Product categories in sidebar based on current products

In my wo-commerce website, I am showing product category list in sidebar. When I go to a product specific page then in sidebar product category list is showing only children of current category, ...
0
votes
1answer
33 views

WordPress Footer Keeps Disappearing

I have had my WordPress site running more or less smoothly for a few years. Recently I noticed that the footer disappeared from the entire site. I did a little digging around only to discover that ...
0
votes
1answer
14 views

jQuery Click event is not fired at all

I'm trying to make a widget plugin that allows user to upload image. but I have a problem in jQuery events that it is never happen ! includes/myplugin.scripts function media_uploader_enqueue() { ...
0
votes
0answers
17 views

Vanilla JS to close notification bar in WordPress

I have created a notification bar that is sticky with the Close button. I am using Top Bar Widget in GeneratePress. I was able to do with the jquery code. jQuery(document).ready(function($){ $(&...
1
vote
1answer
25 views

How to add multiple footer widgets?

I am new to WordPress. I would am currently using the Twenty Seventeen Theme. I would like to add multiple Footer Widgets, however WordPress is limiting me to only two. Is it possible to add a few ...
0
votes
1answer
12 views

Customize section does not show my widget areas

I am building a new theme from scratch as part of my auto learning process. I have added the lines to register a new widget area in functions.php as follow: <?php /** * Including the widget area. ...
1
vote
1answer
37 views

How to create a widget that accepts html input?

I am new to web development and WordPress. Since, I am still learning, I want to achieve the results by doing my own research. And when it is not helping, only then I try to seek help. Well this may ...
0
votes
0answers
25 views

Update widget values from ajax function

I have widget like this class Test extends WP_Widget { public function __construct() { parent::__construct( 'proreco', __('Product recommender', '...
0
votes
0answers
18 views

Help with creating a blog

I am trying to create a blog, MemoriesOf.website, where users can share their memories of something, someone, some event, etc, with other users. There will be a widget with a dropdown, a text box, a ...
0
votes
0answers
17 views

Display Widget with ACF Field content on front-end

I've register new sidebar: register_sidebar( array( 'name' => 'Phone numbers dropdown', 'id' => 'phone-numbers-dropdown', 'before_widget' => '<div class="...
0
votes
1answer
30 views

Widget recent comment filter by post meta_value

How to filter recent comment by post meta value. I have a key “target” in post_meta, and I want to display in my new recent comment widgets. My code : $comment = get_comments( array( ‘number => $...
0
votes
1answer
18 views

Need to delete the sidebar widget area and have the page a full page rather than just have a blank widget area

A recent post on how to remove the archives and meta from the sidebar answered a question I had and I was successful to have the left side of the page blank. The post was at Can not Remove Archives ...
0
votes
0answers
10 views

How to decorate WP_Widget_Text?

Im trying to do an extended WP_Widget_Text, and to be professional, lets use a decorated design pattern. This is all I have: <?php namespace X; class CustomHtml extends \WP_Widget { /** * ...
1
vote
0answers
20 views

Is it possible to make widget return only data (eg, array)?

I want to make widget to return only data (array variable). Here is the code of my widget custom class: class ContactInformationWidget extends WP_Widget { function ContactInformationWidget() { ...
0
votes
1answer
24 views

Trying to style Woocommerce sidebar Cart Widget [closed]

I have looked at length to find CSS that will change the background color, border radius and product info text color. I think this may not be a "mini cart". The price of the item, subtotal ...
0
votes
1answer
35 views

script not working anymore after saving widget settings

I have built a plugin with a widget. This widget has possibly many lines of setting fields, so I devided it in collapsable sections like it is possible with the widgets and sidebars itself. This all ...
0
votes
1answer
23 views

How do I find out which <select ><option </option> was clicked on?

I am trying to build a widget that has a dropdown (<select), a Text input, a textarea and a submit input. When the widget function builds the components & populates the dropdown from the ...
1
vote
0answers
13 views

How to add media field to WP_Widget form function?

I am creating simple WP_Widget plugin and I want to add one filed to form function inside it. I want to allow user to pick some photo from wordpress media. I know how to implement input text, textarea ...
0
votes
1answer
12 views

The styles in the recent posts widgets plugin not working

I am trying to add a wordpress recent posts widget plugin in a theme but somehow even after adding the same class the styles ae not reflecting in the front end i tried to enqueue style in the plugin ...
0
votes
0answers
19 views

Change ul from vertical to horizontal in widget

I am trying to change the style of a widget (https://ibb.co/n3hnXP5) displayed in my home page from Timetable and Event Schedule by MotoPress plugin. The original html output of the widget is <div ...
0
votes
0answers
15 views

Add ID to widget within a dynamic sidebar

I would like my widgets to have a unique ID, preferably based on the title given to the widget. My specific case is that I would like to have a jump link (<a href="#widget-title">) to ...
0
votes
2answers
29 views

Is it bad to add html to a widget by closing and reopening the php tags?

I've just started making my own WordPress widgets and don't have a very good understanding of good practices with PHP or HTML. To add html to a widget I have seen two different methods, the first ...
0
votes
0answers
15 views

Some Widgets in the Right Side Bar and the whole Footer section is not working in a Wordpress Site

My WordPress Website is not working properly. Some Widgets in the Right Side Bar and the whole Footer section is not working. I contacted Theme Support (Generatepress) first. They checked it and told ...
0
votes
0answers
14 views

Add a “add item”, and a “remove item” button to a custom WP theme customizer panel item

I have several questions regarding the WP Customizer Panel. I'm new to web design and have been self teaching how to build a WP website. I'm not super familiar with WP functions, js or jquery and have ...
0
votes
0answers
9 views

Multisite Widgets and Transients

I am trying to share widgets from the main site across the network. I came across some code that sort of does that, but I'm having issues getting the transients right. Here's where I'm at: add_action(...
0
votes
0answers
12 views

Woocommerce Category Dropdown - Show All

I am using what I believe is a default category dropdown widget for my products on WooCommerce called 'Product Categories' it works great but, there is now options to display all, you have to click ...
0
votes
0answers
9 views

Widget Drag and Drop from front end for users and rearrange order retrinving

I'm looking at front end feature, where from widget menu icons on left side, a user can drag and dropped, widgets into a default page common page and arranged in order as required by the user. the ...
0
votes
0answers
5 views

Top Selling Widget products based on Current product category not based on Whole products

I want Show Top selling products within the product page sidebar. like This Example on AliExpress, I mean in aliExpress Show top-selling sidebar widget based on the current product category. That post ...
0
votes
0answers
16 views

Exclude a category from block editor's category widget

I have added category widget form block editor. It shows the list of all categories. I want to exclude a category from that list. How can I exclude a category from this list?
0
votes
0answers
10 views

Modify widget attribute with Javascript

Here´s a tricky one (at least in my eyes ;) ): Is it possible to read data from the user´s current page (like current browser width) using javascript/jQuery and then send it right into a wordpress ...
0
votes
1answer
16 views

Widget not appearing in customizer

Hello I have a theme installed but on the homepage the homepage content widget section does not appear in the customizer view. I have it set on the wp-admin themes settings but when I go to the ...
0
votes
1answer
34 views

After adding widget the style is messing up

I add a widget area to a wordpress theme but the style is somehow not matching with html here is the image before adding widget after adding widget widget area functions.php <?php //Adding the ...
0
votes
1answer
10 views

Current WordPress Page Title as Search Parameter into A Tag <a href=“www.domain.com/s?=currentpagetitle”></a>

i would like to include an affiliate link as a widget which inserts the title of the respective page as search parameter. <a href="www.amazon.com/s?=titleofthepage">Link</a> I have ...
1
vote
2answers
18 views

for class wp_widget, in what order are the member functions called?

When a widget is used, in what order are the members used? Obviously, __construct is first, but what happens next? function widget()? function form()? Which comes first, the chicken or the egg?
0
votes
0answers
13 views

Wordpress data share on multisite

two WordPress sites. The first WordPress site has LearnDash data (course progress, certificates, and completions). The second site is a job board that has user profiles for job seekers. I need to be ...
0
votes
1answer
14 views

How do I get my custom widget to show on live site?

I have created a widget that has labels & inputs & a dropdown. It shows and works on the management screen but on the live site the widget cannot be seen, I have tried some css for dropdowns, ...
0
votes
1answer
20 views

include specific Pages to wp_list_pages with filter

How can i make a simple filter to display only specific pages (include instead of exclude) as an output to wordpress pages widget? I made this code , but its not working function specific_pages($...
0
votes
0answers
14 views

Do widgets support input from users (not admin users)

I am trying to create an autocomplete widget for wordpress to add to an existing custom theme. My question is if this is even possible or are widgets strictly only for displaying information? The ...
0
votes
1answer
22 views

Loading the native Wordpress image uploader in custom widget

Is there an easy way of adding the native image uploader from the 'Image' widget that comes with Wordpress to a custom widget? The WP_Widget_Media_Image class. I would have thought there would have ...
0
votes
1answer
9 views

How take a widget/shortcode on top of page content with CSS o JS?

I wrote a shortcode that generate a custom HTML element using HTMLElement JavaScript class. This widget uses a lot of custom CSS. It works good but on some themes (like The7 i.e.) some page content ...
1
vote
1answer
25 views

Best practices regarding the creation of custom widgets?

I am creating a theme, and I need to create and register a couple of custom widgets for my sidebar. I need to extend the widget class (for every widget) to do this, which produces a metric ton of ...
0
votes
0answers
33 views

My custom widget goes AWOL

5/10/2020 11:00:26 AM I have creted a widget. Yay me! In the admin panel I put my widget on a sidebar. OK, it looks good and does it's job. But, when I go live, my litle widget is...gone! No show. I ...
0
votes
1answer
19 views

Mobile view: how to remove right/left margin from the specific widgets?

May I know how to remove right/left margin from the bottom two parts(Lessons and Fees,Contact) of my website on phone? It seems ok on PC but not on phone. Especially the table for prices lookes ...
0
votes
0answers
14 views

I want to make a content flow in WordPress like the link in the description

I need a plugin or builder widgets that can help me build a similar content flow like this page https://unbounce.com/p/g-ads/lowering-cpa-with-landing-pages/ Wait until the page is fully loaded and ...
0
votes
1answer
48 views

What is the right way to populate a dropdown from MySql?

I am having a heck of a time solving this problem. Please help me find the right way to do this. I am creating a widget that has a dropdown populated with data from custom table; This is the form code:...

1
2 3 4 5
40