Questions tagged [widgets]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 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 ...
user avatar
1 vote
1 answer
33 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 ...
user avatar
  • 167
0 votes
0 answers
10 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 ...
user avatar
0 votes
0 answers
14 views

Script widget works only in admin view but not in Public

Script Widget bug in WordPress. The embed widget from Funda was working before, clueless why it suddenly stopped working. In Public view, it's not working. Preview mode while logged in to WordPress ...
user avatar
  • 1
0 votes
0 answers
14 views

how to remove wrapping widget

I want to remove the default wrapping ul and li class="page_item page-item-2" on the widget this is my code register_sidebar([ "id" => "footer1", "name&...
user avatar
0 votes
1 answer
51 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. ...
user avatar
  • 101
0 votes
1 answer
16 views

Adding additional text under the price via product page

Hey guys I am wanting to just add this additional text underneath the price (circled in red) I am using Xstore child theme via woocommerce/WP and have no idea how to go about adding this in or which ...
user avatar
  • 1
0 votes
0 answers
9 views

Add custom border across footer widget area

I would like to post a custom image (bar) as a border across the widget footer area. Is this possible?
user avatar
0 votes
0 answers
14 views

Is it possible to add a preview to custom developed Widget?

I've developed a couple custom Widgets using the Widget API, but have not been successful in figuring out how to give them a preview in Widget areas under Appearance->Widgets. When the widget isn't ...
user avatar
0 votes
1 answer
9 views

co-authors plugin - inline listing

I'm trying to set up co-authors plugin in order to show articles authors function inl_users() { if ( function_exists( 'get_coauthors' ) ) { $coauthors = get_coauthors(); //array_shift($coauthors); ...
user avatar
0 votes
0 answers
8 views

Available widgets is not showing up?

I have added theme support in functions.php file. add_theme_support('widgets'); And register the menu still no available default widget. class Sidebars{ public function __construct(){ $...
user avatar
  • 101
0 votes
1 answer
16 views

How to enable [archives] short code

I want to use the [archives type=yearly] short code on a side bar widget so that people can click on links and see posts for the year. But this is the result I'm getting: This is what I'm doing in ...
user avatar
  • 145
0 votes
0 answers
17 views

Can you hide a widget based on its content?

I have a Plug-In for displaying events on my site. Unfortunately there is no option to hide it when there are no events, just a specific message saying "There are no events" or something ...
user avatar
2 votes
1 answer
70 views

gutenberg widget outputting paragraph marks

I have created a shortcode to output a wp_Query. Nowhere in my query do I output any <p></p> paragraph marks. However the widget puts this before my output and after. At first I thought ...
user avatar
  • 340
0 votes
0 answers
16 views

How to show multiple posts thumbnail, title and date in widget

I`m making a plugin with a widget to show a post that I recommend or mark with a checkbox in the post list. Question: I have said in the code that I want to show 2 post per page. It only show one with ...
user avatar
  • 21
0 votes
2 answers
34 views

Move position in post list for a custom checkbox column

I have made checkboxes to every post in post list. Question: How can I change the the position for the new column. Now it`s at the right side of the post list. After "Date". How can I move ...
user avatar
  • 21
0 votes
0 answers
28 views

How do I remove/reset all current widgets from the database?

I recently migrated a site from a dev server to a web server and I appear to be stuck with a menu sidebar I had built in the old site that doesn't appear in the widget area of the new site's dashboard ...
user avatar
0 votes
0 answers
11 views

Where does the removing of widget through appearance - customize take affect

I was working with a webshop and having an added theme (newestore-pro). There must be something wrong with the theme, because after having clicked "remove block" (latest post?) when "...
user avatar
0 votes
1 answer
73 views

Add checkbox in admin post list - show checked post in widget

I try to make a plugin with a widget where I can mark / check posts, maybe old post I want to bring back to life. I want to add a checkbox in the field before the title, like I try to show in the ...
user avatar
  • 21
0 votes
0 answers
9 views

How do I add a small excerpt of a blog post on my Front Page Recent Posts widget?

Since my homepage is a static page, WordPress shows a Recent Posts tab with the HTML ID "front-page-recent-posts". This seems to be a unique widget, and I cannot find a way to edit its ...
user avatar
  • 1
0 votes
0 answers
7 views

Filter by Price filter button not working

I'm working on a storefront for a client, and they want their products to be able to be filtered by price. To create the storefront, I installed the Woocommerce plugin, and so far it's been working ...
user avatar
1 vote
0 answers
35 views

How to check if a WordPress core block is active in sidebar

I have a widget area and I want to enqueue a stylesheet only if a core block is active in it. I tried the following code: // if has audio block. if (has_block('audio')) { wp_enqueue_style('audio-...
user avatar
0 votes
0 answers
39 views

Conditional widget for theme template file

I'm trying to think of how to do this but I'm drawing a blank. I need to create a widget, essentially, that someone can add text and an image to (the widget would basically be an image in one column ...
user avatar
  • 113
0 votes
0 answers
29 views

Widgets are not displaying in the admin panel

I am using WordPress, I have an issue with the widget. I am not getting the widget in the WordPress admin panel. I am getting the error in the console Uncaught (in promise) TypeError: null has no ...
user avatar
0 votes
0 answers
131 views

Widget editing returns JSON response error

I am trying to modify the sidebar widgets under Appearance -> Widgets, but whatever I do (just change one option, or remove a widget, etc.), as soon as I press the Update button, on the bottom left ...
user avatar
  • 1
0 votes
0 answers
19 views

How do you create a custom category widget that you can style?

My first time developing a WordPress theme, and I'm having a hard time understanding the widgets portion of it. Mainly because of my limited understanding of PHP. This is what I want my categories to ...
user avatar
0 votes
1 answer
15 views

Allow users to give a dashboard widget a custom name using ACF

I want to use ACF (and CPT) to allow users to give a custom name to an admin dashboard widget from a settings page. In the below code, a widget would be created called "my title". If the ...
user avatar
1 vote
1 answer
63 views

How to filter products using filter products by attribute widget and OR logic between different product attribute types?

I have the following query url to filter products by 2 different attribute types: https://www.example.com/product-category/customized-bags/?filter_wallet-type=womens-wallet&query_type_wallet-type=...
user avatar
  • 83
0 votes
0 answers
19 views

Quick Draft widget in weird place on dashboard after being re-added

My WP host disables the Quick Draft box by default, but I want to add it to my dashboard again. I got it to show up by adding the following to my functions.php. But as you can see from the screenshot ...
user avatar
  • 1
0 votes
0 answers
20 views

Create a List of Widgets, where each widget holds three attributes

i have a specific wordpress page, in which I want to add expandable items. So the item has a keyword and when I press it, it expands and more specific text will show up. The styling and setup of such ...
user avatar
0 votes
1 answer
29 views

How do I find out what is in control over a certain part of a website?

I’ve been trying to get myself familiar with WordPress but with a Joomla mindset I find it quite hard. In Joomla, when you are trying to find out what is in control over an area, you just need to find ...
user avatar
  • 117
0 votes
0 answers
10 views

Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions

I've made custom pages for my website in elementor using the pro version and I've created a couple of them, but I'm having trouble modifying the home page only while editor is working fine on other ...
user avatar
0 votes
0 answers
24 views

How can I display selected content from a seperate database in an Activity style widget?

So, I'm developing an app, and I'd like an option were the user can click a button, and the selected information is disaplyed in a widget sidebar or similar in Wordpress. A usecase would be if someone ...
user avatar
  • 1
1 vote
0 answers
62 views

Is there any way to parse blocks inside widget area?

As widgets are outside post content, i couldn't find the way to parse blocks inserted inside widget area for ex. "sidebar-1" We use something like below for parsing post contents, $post = ...
user avatar
0 votes
0 answers
15 views

Is there any difference between widgets (used in order to manage menus) and register_nav_menus() in terms of performance?

I plan to add in the footer of my website 4 menu areas (such as "About us", "Services", etc.), each area with 3 or 4 links. In terms of performances, should I use widget ...
user avatar
  • 95
0 votes
0 answers
27 views

add title to widgets of wordpress

hello so i want to add on wordpress widgets title= before the href link to widget_recent_entries and widget_pages the title= so how can i do that ? it have an widget-title but not the title= to alla ...
user avatar
1 vote
2 answers
50 views

searchform.php override not working

I'm taking a Udemy class to learn how to make Wordpress plugins and themes. The video I'm on is having me override the default search widget with a custom one via searchform.php. From what I've ...
user avatar
0 votes
1 answer
26 views

Error code when migrate

I got this error code after migration to different server. Warning: require_once(/home/customer/www/noname.com/public_html/wp-includes/widgets/class-wp-widget-pages.php): failed to open stream: No ...
user avatar
  • 1
0 votes
2 answers
367 views

How a HTML form can trigger a PHP function?

I'm new to the Wordpress/PHP world. I want my page be able to communicate with an API that I build myself. So for this I have a form on my Wordpress Page using a HTML code widget which looks like this:...
user avatar
0 votes
1 answer
64 views

How to change widget title in wordpress version 5.8.1?

Maybe this is a novice question but I am stumped. I am trying to change the title of a widget (recent posts) in WordPress 5.8.1 version. I have installed WordPress after a long time again and can not ...
user avatar
0 votes
1 answer
37 views

Retrieve the whole widget sidebar and pass it inside an html

I am trying to pass the sidebar that I have in the shop, inside a side drawer that will have the filters. I have created the HTML/CSS and the js responsible for this to work. But I am trying to get ...
user avatar
  • 11
0 votes
1 answer
262 views

How Migrate a Legacy Widget to block?

I'm trying to tranform legacy widgets to block, I was reading the docs, but I couldn't understand where to put this javascript code : transforms: { from: [ { type: 'block', blocks: ...
user avatar
  • 120
0 votes
0 answers
11 views

Custom Fields - How to get the list of a specific active widget each time it rendered

I am trying to get a specific widget as a list in select input inside a meta box/custom fields. Explanation: I have created a meta box/custom fields in posts and pages. In which I have some input ...
user avatar
0 votes
0 answers
48 views

Custom CSS in Widget editor (Gutenberg) gets stripped out

As of WP 5.8.1 (or 5.8.0) the Gutenberg Editor gets to be default even for Widgets. So I've started to create some Widgets with Gutenberg blocks. My issue is that if I add custom CSS to the blocks (...
user avatar
  • 115
0 votes
0 answers
16 views

Extending the Wordpress Recent Posts Widget

What I am looking for, is to extend the default WordPress "Recent Post Widget". All I really want to add is ability to filter which particular Category I want. Which particular code can help ...
user avatar
0 votes
0 answers
42 views

Wordpress 5.8 : display new widget

I've started a new website with the newest Wordpress 5.8. I've made a new widget thanks to the new widget builder which use Gutenberg block. In my functions.php register_sidebar( array( '...
user avatar
  • 114
0 votes
1 answer
97 views

Why do none of my widgets have a title?

I've never seen this issue before, so it could either be a mistake on my part, or a very recent change to WP core, but either way it doesn't make sense for me. Like usual, I register widgets like I ...
user avatar
  • 297
1 vote
1 answer
438 views

Block-based Widgets Editor - how to enable a title

Using the block-based widget editor, how do I add a widget title? I wish to make the title a link to collapse the widget body using bootstrap and register_sidebar: register_sidebar([ 'name' => __(...
user avatar
  • 127
0 votes
0 answers
28 views

delete widget upon uninstall

I developped a plugin that makes use of the widgets. It is compatible with both pre-5.8 WordPress widgets (legacy widgets) and the new block editor widgets. The widgets of my plugin do nothing but ...
user avatar
  • 21
0 votes
1 answer
365 views

Determine if a specific Gutenberg block is used on pages/posts

So we have built out a Gutenberg block that is acf_register_block_type as the name pardot-form. I want to build a widget to basically just display all locations of where that specific block is being ...
user avatar
  • 15

1
2 3 4 5
42