Questions tagged [widgets]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
464 views

Show latest posts in a plain HTML website custom widget [closed]

I have a plain HTML website with WP in a subfolder (/blog). I need to display latest posts from /blog into the plain HTML webpage. Is there a PHP script or some kind of widget to achieve this? Thanks!
razor7's user avatar
  • 105
0 votes
1 answer
138 views

Custom Image Widget

I need to create an image widget which is similar to the wordpress media image widget, defined in the wordpress core in wp-includes/widgets/class-wp-widget-media-image.php. I only need a couple minor ...
Meyer Auslander's user avatar
1 vote
0 answers
1k views

Your theme has 8 widget areas, but this particular page doesn’t display them

CUrrently I downloaded one wordpress theme. In few pages i have widget area . But i want to display in one more page. On that page i am getting message inside customize->widget as "Your theme ...
Praful's user avatar
  • 11
0 votes
0 answers
144 views

Adding custom post category to categories widget

I'm using a plugin called The Events Calendar, which is creating a custom post type called tribe_events. It also lets me assign categories and add the posts to the main loop. Now I'm trying to get ...
user204381's user avatar
0 votes
1 answer
18 views

RSS Feed on Wordpress showing code (hypertext) in articles titles

The Problem: My Rss Feed headlines have hypertext showing like <b>diving</b> Things I have tried: I've looked on forums and found plugins meant to solve it. Nothing worked. I have added ...
Thommy Kane's user avatar
0 votes
1 answer
129 views

How to override / customize existing Widgets?

I am quite new to Wordpress development and struggle to understand how to correctly override/customize an existing widget. For example I have placed the Recent-Posts widget on a page. While it offers ...
Andrei Herford's user avatar
0 votes
1 answer
227 views

How to use register_sidebar's 'before_widget' unique id generator into its other parameters like 'before_title'?

I'm trying to create a dynamic sidebar that uses bootstrap 4 accordion with the widget's title as the toggle link and the widget content as the accordion's content: Planned Layout: <div class="...
Janfred Magnaye's user avatar
0 votes
1 answer
15 views

Enable accessibility mode in widget as default

Guys how can I Enable widget accessibility mode as a default for all users, I thought about update_user_meta in wp_user-settings but I was not successful. Greetings
Infolu's user avatar
  • 1
0 votes
0 answers
124 views

How to use wp_get_attachment_image or wp_get_attachment_image_src instead of $instance['single_feature_image_uri']

I want to use wp_get_attachment_image() or wp_get_attachment_image_src(). But that widget is not belongs to any post type. widget() Image instance is single_feature_image_uri public function widget( $...
Zahid Hossain's user avatar
0 votes
1 answer
20 views

A message to clients in the dashboard widget received from another site

I would like to display various notifications on the dashboard of client sites. This is not a list of posts, just a message. The message itself is located on my main site. That is, I change the ...
Sergey Pervushin's user avatar
0 votes
1 answer
187 views

Set a dashboard widget to the top?

Instead of manually dragging and dropping a dashboard widget to the top, is there a way to code it into the widget itself so it's always at the top position? Thank you in advance
user204292's user avatar
2 votes
1 answer
542 views

Converting a Wordpress widget to a block

Is it possible to convert an existing Wordpress widget to a block, without having to write a custom block (javascript)?
rhysclay's user avatar
  • 360
0 votes
0 answers
21 views

My css don't get applied on the costume widget

This is my CSS code: text-align: center; text-decoration: none; } div#grow:hover { -webkit-transform: scale(1.3); -ms-transform: scale(1.3); transform: scale(1.3); } ...
josh revenue's user avatar
2 votes
0 answers
106 views

Custom widget select options needs to stay selected after save

I am working on a custom widget that includes a select options drop-down list of pages. When I select a page and save, the selected option does not stay selected. However, if I refresh the widgets ...
osxxso's user avatar
  • 21
0 votes
1 answer
393 views

PHP Warning: Declaration of aec_contributor_list::form() should be compatible with WP_Widget::form($instance)

Ajax Event Calendar plugin is no longer update, but I receive this error. PHP Warning: Declaration of aec_contributor_list::form() should be compatible with WP_Widget::form($instance) in /home/...
Didzruwiem's user avatar
4 votes
1 answer
11k views

Too few arguments to function WP_Widget::__construct(),

first time with custom widget. I'm trying to create it this way: <?php namespace App; class My_Widget extends \WP_Widget { function My_Widget() { $widget_ops = [ 'name' =&...
aitor's user avatar
  • 605
0 votes
0 answers
25 views

Display Most Recent Post Widget Title On Page

I want to display the Recent Posts Widget title on a page, however I could not find a solution yet. I dont want to display the recent posts on the page only the title of the most recent posts widget, ...
Simó Tamás's user avatar
0 votes
0 answers
2k views

Fatal error: Uncaught Error: Class 'WP_Widget' not found

Anybody got a solution for this? I can't reach admin page or most of the other pages except I can reach the home page. Fatal error: Uncaught Error: Class 'WP_Widget' not found in /home1/thehub/...
David Dylan Gower's user avatar
0 votes
1 answer
36 views

How to keep scripts persistent during admin-ajax process when saving widget?

Is there a hook to keep scripts that are included with widgets, persistent during the admin-ajax.php process? I use jQuery show() to open an element within a widget and the element should remain ...
Nadal's user avatar
  • 89
0 votes
0 answers
37 views

Change language in SiteOrigin Widgets

Hello I am trying to change the SiteOrigin widget to German, but I am not succeeding. The admin and user of the site I have already changed to German, but it does not change anything in the SiteOrigin ...
blackplan's user avatar
  • 101
1 vote
1 answer
48 views

Enqueue script/style if certain widget has certain value

I want to build a widget by which various social media sharing buttons can be added to front end. In the widget form there will be many checkboxes for social media. Since these sharing buttons require ...
Mirajul Momin's user avatar
0 votes
1 answer
126 views

Loading Widgets Via Child Theme

I'm using the very popular Elementor theme to build my WordPress site, but unfortunately there is not a Widgets option when I go to Appearance in the Dashboard: I need it in order to create a sidebar....
HappyHands31's user avatar
0 votes
1 answer
77 views

Array showing all values of loop instead of specific value to post

I am trying to make a plugin that allows a user to add custom dashboard widgets that feature individual feeds. I am using Advanced Custom Fields and Custom Post Type UI plugins. The user puts in the ...
Doug Higson's user avatar
1 vote
0 answers
66 views

Adding custom field in all widgets, but at the top of the form, in admin area

I am creating a cute new functionality on my theme that requires to add a custom field to all widgets forms in the admin area. I managed to do so by using the in_widget_form hook: function thefunction(...
Gerardo Peña Pérez's user avatar
0 votes
0 answers
9 views

How to paste widget to a specific page

I want to paste a review widget form my POS system specific to just my review page on word press, i copied teh widget code from service site where do I paste on WP site
Richard Decker's user avatar
0 votes
1 answer
229 views

How to restore an option_value with serialized data from backup data

After changing http to https in several option_values I lost page content. So I reverted the site url back to http and tried to replace an option_value in the wp_options table with data from a recent ...
Nick W's user avatar
  • 123
0 votes
2 answers
163 views

Creating a widget and missing jQuery

Using Astra theme, I cannot use jQuery on the frontend. It keeps logging Uncaught ReferenceError: jQuery is not defined at VM105:23. It is actually supposed that Wordpress is equipped with jQuery, but ...
H. M..'s user avatar
  • 113
0 votes
1 answer
28 views

How to change "Call To +1800090098" in TopStore pro theme [closed]

I'm looking for a way to change the text in the lower menu row (on right side) in a page with TopStore pro (theme). An example of the theme is at https://themehunk.com/wp-themes/top-store-multi-vendor ...
Valter Ekholm's user avatar
0 votes
0 answers
25 views

Widget Style - Icon Type

I would like to use custom image instead icon from Icon Picker in Widget. Problem is, that icon has size about 70x70px, but if I choose image, and I upload it there, it is much more bigger, even tough ...
SMI9's user avatar
  • 1
0 votes
1 answer
112 views

Wordpress widget not appearing in editors widget list

I have created a custom Wordpress (5.6) widget named "Server" which can be added to all sidebars without any problem: But when I try to add the widget to a page content with the editor this ...
Peter's user avatar
  • 103
1 vote
1 answer
121 views

Ajax contact form widget plugin data not insert in database

I have been working at this for weeks without success. I've figured out problem after problem with the code, but none of the corrections seem to fix my core problem. The form doesn't insert anything ...
dhanar98's user avatar
1 vote
0 answers
28 views

Getting a div wrapped around two widgets

To get the layout I'm looking for, I (think that I) need to get a div to surround two of the three widgets that I am placing in a widget area. Is there a way to do this without making a new sort of ...
bmargulies's user avatar
0 votes
0 answers
172 views

elementor development - custom widget like an inner section widget

I want to create a custom widget like an inner section widget, this custom widget is almost like an inner section widget. the problem is I can't find a reference to the elementor website developer, ...
i kadek teguh mahesa's user avatar
0 votes
0 answers
47 views

How to stop hiding buttons forward / backward in pagination?

I am doing pagination on my site. For this, I use the get_the_posts_pagination function. Now, the back button is hidden on the first page, and the forward button is hidden on the last page. How do you ...
dg g4re's user avatar
0 votes
0 answers
415 views

How can I remove Wordpress element IDs and Class names in the HTML?

Very much following this advice for body class: https://edinburghwp.com/removing-page-post-tag-category-taxonomy-ids-from-body_class-wordpress/ I'd like to remove the IDs and Classes that WP ...
joycegrace's user avatar
1 vote
0 answers
102 views

How to extend WP_Widget_Media

I am new to WordPress theme development. I'd like to create a new widget based on the built-in Image widget, with additional fields such as 'description' & 'speaker'... etc. The widget is called '...
brian's user avatar
  • 111
0 votes
1 answer
19 views

Remove widgets on mobile front page without affecting desktop

I customized my desktop page with widgets so that the articles are arranged into different aesthetically pleasing sections... but on my mobile page, I'd like all the articles to just show up by order ...
amy lee's user avatar
0 votes
1 answer
105 views

Dynamic Bootstrap Carousel ID per widget on same page

I have integrated bootstrap Carousel into a WordPress widget. Carousel requires a unique ID per each for the controls to work. So if I am using 2 widgets that means 2 carousels on the same page the ...
David Buik's user avatar
1 vote
0 answers
69 views

List of JS Events for Widgets?

Does anyone know if there's a list of all JavaScript events for widgets? I know there are other lists (e.g. Woocommerce; wp.media) but I'm looking for one specifically for widgets. It took me a bit of ...
DaveyJake's user avatar
  • 143
0 votes
1 answer
40 views

Inserting a class on before_widget if checkbox is checked

I have a check box showing on all widgets, a simple option to double the size of the widget on the frontent. function doublesize_option( $widget, $return, $instance ) { $large = isset( $instance['...
wally9's user avatar
  • 1
0 votes
1 answer
145 views

How to get individual values from custom widget?

I have the following custom sidebar: I want to know if it's possible to get the values stored in each widget individually. I already tried doing the following: global $wp_registered_widgets; $widgets ...
Daniel Bertoldi's user avatar
1 vote
0 answers
109 views

How do I change the markup only of a built-in widget?

I'm developing a theme and I'd like to slightly alter some of the HTML output of some of the built-in widgets. As of now, I managed to change the sidebar search widget by creating a searchform.php ...
Morpheu5's user avatar
  • 111
0 votes
1 answer
74 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 ...
Alex's user avatar
  • 1
0 votes
0 answers
31 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. ...
UntitledGraphic's user avatar
2 votes
1 answer
691 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( '...
Botond Vajna's user avatar
1 vote
1 answer
1k 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() { ...
Islam Hanafi Mahmoud's user avatar
1 vote
1 answer
883 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 ...
Developer's user avatar
0 votes
1 answer
71 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. ...
Oscar Contreras's user avatar
1 vote
1 answer
421 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 ...
Manohar Bhatia's user avatar
0 votes
0 answers
187 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', '...
Miomir Dancevic's user avatar

1 2
3
4 5
42