Questions tagged [widgets]

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

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

Blank widgets page after core update - which files to purge cache?

When I update my WordPress network's core version I often find my sites have a blank widgets admin page. Dev console shows a lot of JS errors. This is fixed by doing a full cache purge of the domain, ...
Anthony's user avatar
  • 101
0 votes
1 answer
12 views

Exclude category in widget through child theme

I desperately try to exclude categories through following snippet in my functions.php of my child theme: <?php //https://developer.wordpress.org/themes/advanced-topics/child-themes/#how-to-create-a-...
Rob's user avatar
  • 1
0 votes
1 answer
23 views

Create side bar widget showing list of years as hyperlinks for a custom post type

I have a WP site using Elementor Pro. I have created a Custom Post Type called "Meeting" I have created an archive page for "Meetings" using a Loop Grid To display the post ...
user3067865's user avatar
0 votes
0 answers
17 views

$_POST[] variable is inaccessible in block editor. Is there any workaround?

I am building a legacy widget where I need to access some checkbox values added to the DOM in runtime using client script. For example: <input id="groups-2-523221" type="checkbox&...
Subrata Sarkar's user avatar
0 votes
0 answers
24 views

How to know the Post Data Object in block editor when I hit the Update button

I need to see the Post Data that is being submitted when I hit the Update button of the block widget. I want to print this object in JavaScript console so that I can inspect the data. The reason for ...
Subrata Sarkar's user avatar
0 votes
0 answers
10 views

Accordion takes longer to collapse when placed in a block widget editor

I am facing a strange issue with my plugin. It can also be placed as a block when block widget mode is activated. The plugin has an accordion with four containers. Each container has its own form and ...
Subrata Sarkar's user avatar
0 votes
1 answer
22 views

how can i modify the default wordpress sidebar

I need to hide the Uncategorized category from the default sidebar. I edited the file wp-includes/widgets/class-wp-widget-categories.php, but I did not see any changes. Here is an image of my sidebar, ...
waqas023's user avatar
0 votes
0 answers
18 views

Selecting what blocks are allowed in core/edit-widgets by sidebar ID

I am looking to control what blocks are available to the user in the "block-based widget area". I see this as the perfect area for handling things such as contact numbers, and alert messages ...
Bagseye's user avatar
  • 69
0 votes
1 answer
29 views

How to insert a block in a widget which links to a entry/page

I'd like to insert a link in a widget to a blog entry or page. The link's text should be the entry's/page's title. As stated here, it's currently not possible to use the navigation block in a widget ...
Abid's user avatar
  • 143
0 votes
1 answer
17 views

Using a custom widget to add data from a custom post type into the sidebar

A while ago I found a theme called “Games Zone”, by Themefuse, that used a custom widget to add information from a custom post type into the sidebar of a post. I spent some time tearing down the code ...
bstphillips's user avatar
0 votes
0 answers
21 views

Multiple wp.editor in a custom widget using JQuery

Hi I'm trying to build a custom accordion widget with the possibility to add multiples panels with WYSIWYG editor. My issue is that the editor content from the javascript is not saved in my widget $...
Daniel Ringuet's user avatar
0 votes
0 answers
22 views

Image inside the content is replaced with featured image from my older post

I'm trying to create a popular posts widget and display the images via this function: function vp_get_thumb_url($post, $text, $size){ $imageurl=""; // 1) FEATURED IMAGE // ...
justtme's user avatar
0 votes
1 answer
15 views

How to add the "page" post type to Recent Activity widget displayed in admin?

I already know how to custom the default Recent Activity widget displayed in Dashboard in order to show the last Custom Post Types published : add_filter( 'dashboard_recent_posts_query_args', function(...
PhpDoe's user avatar
  • 180
0 votes
1 answer
93 views

Why my widget is not visible in the Wordpress theme Twenty Twenty-Three

Why my widget is not visible in the Wordpress theme Twenty Twenty-Three ? in other wordpress themes that I have tried it can be used normally. even though the plugin is normally installed, the widget ...
user232773's user avatar
0 votes
1 answer
73 views

Users as team members through a loop in elementor

I am trying to create a loop in Elementor's theme builder that will display each user with the role of the Contributor or Author. I.E. When the admin of the website will add a new user with the above ...
Andrei Dombrov's user avatar
0 votes
1 answer
19 views

Custom dashboard widget - load style only for added widget

I'm writing a custom dashboard plugin using vue js and boostrap 5. I've noticed that bootstrap will be loaded for all the dashboard and I want to use it only to style my dashboard widget. My question ...
ICTDEV's user avatar
  • 111
0 votes
1 answer
42 views

Output number of Wordpress posts remaining until a post milestone is reached

Some time ago there was a Wordpress plugin (Post Countdown) that created a widget to display how many posts there were still to be published before a milestone was reached. As of PHP8 it no longer ...
Mr. CRJ's user avatar
0 votes
0 answers
229 views

how to check elementor is widget is active or loaded

I have create a custom widget for Elementor. I want to check with the code whether my widget is used or loaded (active) on the page or not? How can I do this? I want the styles related to the widget ...
alex dev's user avatar
1 vote
0 answers
18 views

Add custom settings to widget areas

I'd like to add settings to sidebars defined in my custom theme - sometimes, for example, I'd like to be able to set a widget area to not display. Is this possible, I can't find any references for it?
toby1kenobi's user avatar
0 votes
0 answers
50 views

How to edit a widget code?

I use a Latest Portfolio widget, but it can show max 20, but I need 30. While using Inspector, I can see the counter from 1-20, but cannot figure out which file has it. I viewed almost all files but ...
Pagula Majorda's user avatar
0 votes
0 answers
28 views

Can't edit the widgets sidebar or footer

Why can't I edit my widgets sidebar ? website can be found here.
Crypto Coupons's user avatar
0 votes
0 answers
29 views

Theme Widget Area Defaults

In my custom theme's function.php file, I have created a widget area: function my_footer_widget_area() { $args = array( 'id' => 'footer_widget_area', 'class' => '...
Rick Hellewell's user avatar
0 votes
1 answer
205 views

How can I add a zip code service availability checker in Wordpress without Woocommerce? [closed]

The website is for a business that only provides services in certain zip codes. I would like to be able to display different messages based on if the zip code matches one in my list or not. I couldn't ...
NCBlender's user avatar
0 votes
0 answers
130 views

Hide empty categories on widget

I excluded some products from woocommerce_product_query with this code: function en_archive_products_by_rol( $query ) { if (is_admin()) { return; } $meta_query = (...
Elianalu's user avatar
3 votes
1 answer
256 views

getBlockVariations(…) is undefined in Widget and Template Part editors but not Post Editor

I'm using this technique to hide various embed blocks: wp.domReady( function() { /* * Hide Embed Variations */ wp.blocks.getBlockVariations('core/embed').forEach(function (embed) { ...
mrwweb's user avatar
  • 10.2k
2 votes
1 answer
80 views

Swap Wordpress "Widget Area" based on Page Template

i'm using 3 widget areas in my child theme's footer. i created a secondary custom theme successfully, and am hoping i can simply change those 3 widget area's out in the second theme. "Footer - ...
SyberKnight's user avatar
0 votes
0 answers
9 views

Hiding Widget On Mobile Devices Removes Our Product Search Box On Mobiles

We have a live search product bar on our website, which sits in the right hand sidebar on desktop versions, and we have some custom css which places it at the top on mobile devices, as it would ...
php_555's user avatar
6 votes
1 answer
412 views

Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?

TL;DR : In simple terms, I just want to add a Dashboard Widget created by our plugin using wp_add_dashboard_widget function, to a custom Admin Menu Page created by the same plugin using add_menu_page ...
Ranuka's user avatar
  • 1,782
0 votes
1 answer
47 views

How to tell if a dynamic sidebar is being displayed on page?

I'm trying to conditionally add a class of has-sidebar to a wrapper div, and I'm struggling to find a conditional statement to see if the sidebar is active on the current page. For example: <!-- ...
Sackadelic's user avatar
0 votes
2 answers
280 views

Remove nofollow attribute from social widget links

My footer social icons widget includes a nofollow attribute in links to my social media pages. I cannot find an option to turn this off. How might I remove this attribute either with a setting or ...
user16421's user avatar
0 votes
1 answer
59 views

SVG Icon Code Support in WordPress Custom Html Widget? Not Working

I am Trying to Add SVG Icon Code in Custom HTML Widget, it is not working showing following error "There is 1 error which must be fixed before you can save.". How we can fix it without ...
Islamic Quran Center's user avatar
0 votes
0 answers
35 views

Issue with customizer and widget page

I have a wordpress website with hair and beauty theme, for some reason the customizer and widget page in wp-admin are not working and giving 404 error, i tried the following things so far check ...
Sankalp Chari's user avatar
0 votes
0 answers
14 views

is it possible to create custom widgets page in admin?

I am currently programming a WordPress theme And I'm thinking of adding ads control places in the widgets (using register_sidebar, but at the moment the widgets appear in one place without ...
jimi-del's user avatar
0 votes
0 answers
10 views

How to create a dashboard to show current user analytics in buddypress

I want a dashboard widget or a front end dashboard to show post views and other analytics of a current user who is logged in. I tried to put various widgets but it is showing all data irrespective of ...
decamatter's user avatar
0 votes
0 answers
14 views

How to Manage Multiple WordPress Websites from one dashboard (WooCommerce)

I have 10+ E-commerce WordPress websites that, I want to have a one dashboard with E-commerce information like sales,orders and status of the orders.. I just tried MainWP, but it doesn't come with ...
jakijunior's user avatar
1 vote
1 answer
151 views

How to use apply_filters('get_calendar') to change get_calendar() output?

I am completely new in using apply_filters() while making a theme. I use a standard Wordpress widget to display calendar. However i need to change his HTML output to get a link button to current month ...
X9DESIGN's user avatar
  • 157
0 votes
1 answer
36 views

Filter widget_pages_args not working in Pages Widget

I try to use a filter to remove some pages from Widget Pages but it seems not to be working. What I am doing wrong? add_filter( 'widget_pages_args', 'custom_list_pages_filter', 10, 1 ); function ...
user2088350's user avatar
1 vote
1 answer
27 views

Classic widgets with 5.9+?

This widget prints Hello Widget and works with many versions of WordPress including 5.8.4, but with 5.9.1, 5.9.3 or 6.0.1 (all with classic-widgets 0.3 installed) it appears the widget() method never ...
sampi's user avatar
  • 159
1 vote
0 answers
33 views

Footer option is missing in Customiser

Below is my dashboard screenshot, I don't see the footer option in my customizer. I have struggled a lot to research on this but no luck. Can anybody please help me with this? how can I show the ...
ss-ss-v1's user avatar
0 votes
0 answers
211 views

Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)

I'm making a certificate that's supposed to autogenerate and involves the need for multiple dynamic fields. I have everything else finished but I have difficulty trying to create 3 dynamic fields. ...
ElectrocuteComputer's user avatar
0 votes
0 answers
32 views

Widget block editor: Unable to collect checkbox values inside widget update() method

Users can select an item from the list (the items are actually listed inside a DIV container). Upon selection, the item is added below with a leading checkbox in checked mode. When saved, the items ...
Subrata Sarkar's user avatar
0 votes
0 answers
49 views

How do I remove lazyloading on the mh-spotlight-widget

What is the easiest way to disable native lazy load without a plugin for a specific widget in WordPress? I can't find anything at all about this question that I could use for functions.php? // XX = ...
Aprilia Parrino's user avatar
0 votes
1 answer
167 views

Problem extending a core block

I need to make a search block by creating a new instance of the core / search block (a basic wordpress block). I tried with the registerBlockType function with which I get this error message: ...
Luca Scandroglio's user avatar
0 votes
1 answer
51 views

Inject "fake" category to widget/block

I have a regular categories widget (or "block" in the new terminology), that creates a <ul> with my categories. I want to add a fake category for linkbuilding reasons, an entry to ...
Sofia Grillo's user avatar
1 vote
1 answer
90 views

Unable to locate inline CSS causing parts of page to be blank

Large parts on a live Wordpress page shows blank because a piece of inline CSS has opacity set to 0. Unfortunately I am unable to find where this inline CSS lives. <div class="grve-element ...
bart's user avatar
  • 205
4 votes
3 answers
14k views

WordPress 6.0 class-wp-widget.php fatal errors in PHP 8.1.6

/wp-includes/class-wp-widget.php gives me an error for one blog, but not the other, and both have the same version of class-wp-widget.php which makes no sense to me. PHP Fatal error: Uncaught ...
PJ Brunet's user avatar
  • 500
0 votes
1 answer
265 views

Table of contents (TOC) plugin is not showing header tag

I made a post template using meta box(custom field). If I put data into metabox, the template part (contents with h2, h3, p) shows up at the bottom of post (not on post edit page). However, every TOC ...
Morty_Smith's user avatar
1 vote
1 answer
184 views

isSavingPost() for widgets

I want to get the block ID of my widgets (e.g. #block-1, which is displayed on the frontend after saving a widget) on the widgets screen in the backend. What I try to achieve is to display the ID of ...
KittMedia's user avatar
  • 179
0 votes
0 answers
36 views

Console errors in 6.0-RC1 Widget screen

Sine 6.0-RC1 the following console error appears on the block widgets screen, on Firefox: Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a ...
Jacob N Breetvelt's user avatar
0 votes
1 answer
440 views

Include widget file in functions.php of child theme

I've created a widget for WP 5.9.3, based on an online tutorial, which I'd got working okay, but it relied on having all the code in the child theme's functions.php, which started looking a bit messy. ...
Cheddar's user avatar
  • 101

1
2 3 4 5
42