Questions tagged [widgets]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
12 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/...
0
votes
1answer
24 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' =&...
0
votes
0answers
15 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, ...
0
votes
0answers
22 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/...
0
votes
0answers
13 views

Getting a 404 error on auto-generated archive link (in wp widget)

I'm using the wordpress archive widget in my sidebar. The permalinks are set to the format: website.com/year/month/ All of them work except January. I have not set any custom links or changed any ...
0
votes
0answers
4 views

How to have sidebar menu that only display the submenu entries but not top menu entries?

Say I have a menu: Level 1 Level 2 Level 2.1 Level 2.2 Level 2.2.1 Level 2.3 Level 3 Then if I select any article within level 2, then the sidebar will display the menu for level 2. Is there a ...
0
votes
1answer
14 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 ...
0
votes
0answers
8 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 ...
1
vote
0answers
25 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 ...
0
votes
0answers
14 views

Why are Elementor HTML Widgets duplicating actions?

I have an Elementor HTML widget on a page that is being used to call a color picker and change the color of some text. Works fine, here's the code: <label for="colorWell">Text Color<...
0
votes
1answer
12 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....
0
votes
0answers
19 views

Replace basic widget title with text

I want to replace the title text in this basic Appearance Widget with an image /icon in the front end. It is a title for a filter widget. https://imgur.com/llsOYlU I have tried using CSS of the div ID ...
1
vote
0answers
13 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(...
0
votes
0answers
7 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
0
votes
1answer
9 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 ...
0
votes
0answers
9 views

Find where widgets are placed

I can not find a plugin nor a native system to list where widgets are displayed. I also tried to use Admincolumns with no luck so far.
0
votes
2answers
9 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 ...
0
votes
1answer
17 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 ...
0
votes
0answers
9 views

I cant show form value on widget section

I found a widget code that has repeater control and input gield on another question to make my own widget plugin.You can check the question: the answer from Sengngy Kouch . Is dynamic forms/entries ...
0
votes
0answers
20 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
33 views

Create Custom Elementor Widget in Theme

I'm creating custom Elementor widgets by creating a custom plugin as they say. But I want to include Elementor widgets into my custom theme. So how do I create a custom Elementor widget in the theme ...
1
vote
1answer
51 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 ...
0
votes
0answers
6 views

What is the standard/best way to call javascript (for Colorpickers, Media, …) within custom widgets, that work within the customizer as well?

I have created a custom widget that has two color settings. The color settings are based on this code https://gist.github.com/rodica-andronache/54f3ea95bcaf76435e55 The color pickers work fine, ...
0
votes
0answers
24 views

use has_term for product attribute

I'm using Conditional tags to display specific widget on specific product : for example : has_term('book', 'product_tag') or has_term( array( 'hyundai', 'kia' ) , 'pwb-brand') now i want use product ...
1
vote
0answers
9 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 ...
0
votes
0answers
10 views

How to display HTML in frontend for widget development?

I'm still new to PHP and WordPress, I have HTML I want to display with someone puts in this widget but I'm not sure why it is not displaying. I know I'm doing something or a lot of things wrong. Am I ...
0
votes
0answers
48 views

How to display Elementor widget from another Elementor widget using PHP

I create a custom Elementor widget like plugin and want to use another Elementor widget from it. It is not a problem to show a standard WordPress widget (code in the function render()): the_widget('...
0
votes
0answers
31 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, ...
0
votes
0answers
19 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 ...
0
votes
0answers
9 views

Display URL from Widget content inside href=“”

I'm creating list of social networks. I displayed on front-end and styled in code. Now I want to have option in Widgets to change URLs for each socia network. I created sidebar: register_sidebar( ...
0
votes
0answers
21 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 ...
0
votes
0answers
26 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 '...
0
votes
0answers
17 views

how to add limit List Custom Taxonomy Widget Wordpress?

how to add the limit feature to the plugin List Custom Taxonomy Widget Wordpress, I want to show only 5 or 10 custom taxonomy widget lists. <?php add_action( 'widgets_init', 'init_lc_taxonomy' ); ...
0
votes
0answers
14 views

How could I get current sidebar ID

I would like to show the same widget with different styles in different sidebar locations. For example: if( is_dynamic_sidebar( 'sidebar-1' ) ) { // show this style } elseif ( is_dynamic_sidebar( '...
0
votes
0answers
7 views

How allow admin to manage textual information in a custom post type page?

I have a custom post type allowing to create articles as meals. All that meals are rendered in a specific page. I want to add information about menu & prices on top of that page (like a banner ...
0
votes
1answer
15 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 ...
0
votes
0answers
24 views

How to display default widgets on sidebar?

I want to display widgets to sidebar while previewing theme on wordpress.org Now I turned on sidebar but by while previewing on wordpress.org the sidebar is empty. Is it possible to display widgets ...
0
votes
0answers
32 views

How to manually insert related posts anywhere in the posts?

I am new to WordPress. I want a widget/plugin for inserting related posts anywhere I want in my post content. I already have tried so many plugins and unfortunately I failed to find something I want. ...
0
votes
0answers
15 views

Custom widget only works once, cannot place in more than one widget area

I have created this simple custom widget. It works as expected but only on one widget area. <?php // Creating a custom widget class mycustomwidget extends WP_Widget { function __construct(...
0
votes
1answer
12 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 ...
0
votes
0answers
14 views

Creating a cache but cant seem to find add_widget or edit_widget do_action

Creating a cache plugin when I edit/delete/add post etc, it will reset the cache but can't find add_widget or edit_widget. Does anyone have the answer? What other do_action am I missing here? ...
0
votes
0answers
12 views

How do I create a form inside my back end of widget and display it in a certain area for the end of my widget

I have used the youtube video: (https://www.youtube.com/watch?v=OJdIUU1pjl4&t=1261s) to learn how to create my first custom widget. From here I have create a class with a front end display and a ...
0
votes
0answers
25 views

How to get archive link for multiple categories or select posts

Have widget which has option to display post with multiple categories or using posts ids Now i want to generate archive link for any of these condition. If user select 20 post ids have option to limit ...
1
vote
0answers
20 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 ...
0
votes
1answer
14 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['...
0
votes
1answer
21 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 ...
0
votes
0answers
61 views

How to share widget content within a custom sidebar across a Multisite

I am creating a Wordpress Multisite and I need a sidebar that will display on all the child websites but where the content will be added and changed from the parent main site. I have looked into ...
1
vote
0answers
38 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 ...
0
votes
0answers
16 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 ...

1
2 3 4 5
41