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
20 views

Why doesn't my star rating widget work?

Currently working on a Wordpress theme, and I can't for the life of me get my start rating widget to work. I can call the function directly in the template via php, and via a short code, but my widget ...
Mikedefieslife's user avatar
1 vote
0 answers
17 views

wordpress-plugin (widget) that performs a Neaby-search on the openstreetmap-endpoint: around x find y

i am about to create a wordpress-plugin that offers the output of the following data ... the data of a a Neaby-search: can we create a quewry that shows up all the schools that are in the near - in ...
thannen's user avatar
  • 111
0 votes
3 answers
49 views

Wordpress child theme widget customization - Eduma

0 I'm in a bit of a struggle at the moment so I could use some help. The thing is, I need to fix some fields for registration in the Eduma theme Eduma theme has it's own child theme called Eduma-child,...
PhantomPhreak1995's user avatar
0 votes
0 answers
12 views

Sidebar inside page conten

I have WordPress page's or pages' layout like this: I'm wondering what would be the best way to handle this. I was thinking about adding shortcode inside column, that would export widget area: ...
Filip Witkowski's user avatar
0 votes
1 answer
165 views

WordPress PHP8.2 Critical Error in class-wp-widget.php

Recently updated to PHP8.2 and I'm getting a critical error related to the theme. The critical error is: Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct()...
miko's user avatar
  • 1
0 votes
0 answers
13 views

RSS Feed Button not showing

I am trying to add follow feature of RSS feed so that other people can follow my RSS feed to get updated. I am trying this with adding widget and in that widget I choose the RSS feed. and I am using ...
ss-ss-v1's user avatar
0 votes
0 answers
27 views

ACF true/false field in a custom dashboard widget?

I have a true/false ACF field a setting on my site. I was thinking that instead of burying it in an options page I could create a dashboard widget so it can be toggled on and off right from the main ...
user13286's user avatar
  • 255
0 votes
1 answer
24 views

Create custom dashboard for plugin

I am trying to create in admin area my own Dashboard for my plugin. Only article I found is an example in WP Developer Resources but the widgets cannot be moved. I suspect that loading script code in ...
Vlado's user avatar
  • 111
0 votes
0 answers
11 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
59 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
28 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 ...
Jasperjon's user avatar
  • 101
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
28 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
18 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
32 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
21 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
35 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
33 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
29 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
28 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
21 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
  • 197
0 votes
1 answer
197 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
268 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
25 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
  • 113
0 votes
1 answer
60 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
441 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
75 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
44 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
1 answer
320 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
187 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
402 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
106 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
6 votes
1 answer
666 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
126 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
566 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
79 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
1 vote
1 answer
196 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
  • 159
0 votes
1 answer
46 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
30 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
57 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
341 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
41 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
208 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 Pisoni's user avatar
0 votes
1 answer
71 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
116 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
  • 225
5 votes
3 answers
17k 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
  • 530
0 votes
1 answer
380 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
248 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
  • 191

1
2 3 4 5
42