Questions tagged [widgets]

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

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

Embedable share widget

Hi I was having trouble creating a widget that launches a new post on my social media site. I want to give people the options to embed my widget into their own website and when it is clicked to launch ...
0
votes
1answer
27 views

How to remove the bullet points for sidebar widget [closed]

Can anybody help me remove these stupid bullet points in my sidebar for my shop?
0
votes
0answers
12 views

How can I hyperlink calendar days that have post

I have a widget that was custom created to display a calendar. The code for the widget looks like the following: <?php class __themename_Most_recent_widget extends WP_Widget{ /* * The ...
-1
votes
0answers
8 views

Toggle button for sidebar widget for mobile and ipad under OCEANWP Wordpress [closed]

My sidebar goes fullscreen whenever its on mobile or ipad view. help
0
votes
1answer
24 views

Add class to <ul> on sidebar widget

I have been looking on stack overflow and the web but can't find a simple solution for this. I just want to add a class to the of the widget sidebar generated by Wordpress. This is my register ...
0
votes
1answer
35 views

Make Widget appear on Dashboard

I recently created a widget in my functions.php with following code : register_sidebar( array( 'name' => __( 'Informations importantes', 'twentynineteen' ), 'id' ...
0
votes
0answers
9 views

Get sidebarname in widget on the adminarea side

I'm working on a custom widget. When on the widgets.php page in the admin area (so not the front-end) of the WP site I want to dynamically get the sidebarname of the current sidebar inside my widget. ...
0
votes
1answer
8 views

How to add post type in masonry posts elementory widget

When I try to create a website using Wordpress 5.2.2. I found a widget called Masonry Posts in Elementor Panel. But when I added the widget and checked there is no option to choose the post type. We ...
0
votes
0answers
23 views

Create a modified Gallery Widget in WordPress

I want to create a Gallery Widget - similar to the lines of the one already present in WordPress. In fact, I copied the complete code of the Widget class in the theme. What I want to create is a ...
0
votes
0answers
13 views

How to convert this product category widget into dropdown

So I have been trying to make this product category widget into dropdown but without luck would really appreciate if someone can point me in the right direction. THanks <?php if (!defined('...
0
votes
0answers
17 views

Related Post Widget manual Post selection

I am trying to create a sidebar widget that shows Posts based on the selection from an ACF field. The selected Posts can be from any Post category or CPT, using the Post Object field in ACF. ...
2
votes
1answer
20 views

WordPress tag cloud add more links

Due to location constraints, the Tag Cloud widget settings display 30 tags. Can I insert a custom link at the end of the tag cloud? So that I can link to a tag archive page. Thanks in advance!
0
votes
1answer
24 views

My website is not showing Footer section

** EDITED ** Hello im new with Wordpress, Im having a problem with widgets (sidebar and footer) my footer.php is not being rendering unless I delete sidebar.php from files. Ive tryed to debug but ...
0
votes
1answer
13 views

Adding widget to sidebar which contains current page's submenu

Need to insert the sub menu of the current page into the current page's sidebar. Is this possible? What I'm interested in developing would be a menu that looks like this: menuItem1 => subitem1, ...
0
votes
1answer
23 views

Co-author plus: list of posts by authors in the sidebar

I am using co-author plus. I would like to display all/recent posts by authors of a post in the sidebar. Is there a way of doing that? Plugins like Author Recent Posts do not work with Co-author plus. ...
0
votes
0answers
25 views

custom meta_box doesn't display in custom widget

I have some meta_box that display on single page correctly but when I use custom widget to display different category's posts,the meta_box doesn't display in main page. in below code I expect display ...
0
votes
1answer
12 views

Extend WordPress Audio Widget to accept HLS (.m3u8) URLs

I'm working on a new FM radio station website, I was trying to use the default WordPress Audio Widget to play their live audio stream. The problem was that the Insert from URL option doesn't accept ....
1
vote
1answer
23 views

Drafts widget for admin page

The Quick Draft widget on the admin dashboard has an area to create a new post and a list of recent drafts. I'd like a widget like this but with ONLY a list of recent drafts. Surprisingly, I couldn'...
1
vote
1answer
19 views

How to allow your custom widget as block in gutemberg editor

I would like to add a widget in gutemberg as block like this : Is there a way to do it instead of using a shortcode ?
0
votes
1answer
20 views

Searching for a one page overview widget

I am currently using the Lodestar theme. My website is built up in a way that the navigation bar at the top leads you to different pages which have a one-page static structure. To allow for ...
0
votes
0answers
28 views

Sorting Tag Cloud by Popularity

So I have the default Wordpress Tag Cloud Widget on my sidebar/footer and I found the following code to limit the number that it's showing because it took up a ton of space. This code however is not ...
0
votes
1answer
36 views

Can't get wpColorPicker to work in a widget

I can show the color picker, I can change the color and see the save button watching that, however nothing is saved to DB and I'm getting Undefined index: my_color", file: "wp-content/plugins/...
1
vote
1answer
32 views

How to hide CSS by default and show on button press

I have the Elementor Pro page builder plugin installed and I want to setup a expanding column so when a button is pressed it expands more Elementor sections. I'm pretty certain this can be done with ...
0
votes
0answers
32 views

Elementor widgets - conditional controls

I'm creating my first elementor widget. I need to create 3 conditional controls: Select a (custom)post_type -> select a taxonomy belonging to the respective post_type -> select posts belonging to the ...
0
votes
1answer
27 views

custom widget not saved to sidebar

I'm trying to implement a custom widget in wordpress 5.2.1, but the widget is not actually added to the sidebar and lost again after reload. This is my widget code: class DW_Center_Address_Widget ...
0
votes
1answer
17 views

How to make widget appear conditionally

I hope you can help. I have two pieces of code that I do not know how to pair. I want my widget to only appear on posts and furthermore only if one specific category is picked. Whenever I try to put ...
0
votes
0answers
21 views

When editing in block editor, the post/article gets under the floating widgets

When editing in block editor, the post/article gets under the floating widgets and I am not able to edit that portion of the article which is behind the widget inside block editor. I am attaching a ...
0
votes
1answer
51 views

Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?

WordPress 5.2 destroys structured data by adding rel="noopener noreferrer" to widget output (also to shortcodes): How to display the shortcode output without code change? This feature was added in 5....
0
votes
1answer
9 views

How to point menu to my homepage

So basicially i have a long-long homepage where you can scroll down and find a services section, if you scroll down more you see important informations and etc. but i have a menu. I want to make the ...
0
votes
1answer
34 views

Widget image reorganize layout

I'm currently using the native widget-image which output content like that: <section class="widget widget_media_image"> <h2 class="widget-title">Some title</h2> <a href="...
0
votes
0answers
36 views

Is there a way to extend the default image widget into a new custom widget and add additional fields to it?

Ultimately I'm wanting to add some custom widget fields to the existing default image widget, and define it as a new custom widget. I'm trying to create my own by extending the WP_Widget_Media_Image ...
0
votes
1answer
31 views

How can I change the button text of a custom widget?

We had a theme developed that has a custom widget class. class ams_button_widget extends WP_Widget { ... public function widget( $args, $instance ) { $btn_text = apply_filters( '...
0
votes
1answer
27 views

Save button is not working on custom widget

I created a custom widget according to Widget API and it seems to work until I make changes. The save button is not triggered, this problem is only affecting this new widget. Ps. The custom widget ...
-3
votes
1answer
29 views

How can I create my own widgets in WordPress? [closed]

function wp_load_widget() { register_widget( 'wp_widget' ); } add_action( 'widgets_init', 'wp_load_widget' ); class wp_widget extends WP_Widget { function __construct() { parent::__construct( '...
0
votes
1answer
17 views

How can I make my custom shortcode work in a Custom HTML Widget?

I created a plugin and tried to use its shortcode in a Custom HTML Widget, but for some reason it's outputting [my_shortcode_name] instead of executing the shortcode. The shortcode works fine if I ...
0
votes
0answers
17 views

How to use categories and tags widgets together?

Is it possible to use wordpress build in tags and categories widgets together? For example selecting first category and then tag showing only the posts that match both? I searched for some kind of ...
1
vote
1answer
33 views

Global $wpdb is not showing correct data with function call

I have a code which shows last 3 recent updated pages or post. This code is working perfectly when I add it on theme sidebar.php file. <?php $today = current_time('mysql', 1); $count = 3; if (...
0
votes
0answers
10 views

Widget update method seems to be not called or does not work

In my widget, when I try to update any value, that does not work. First of all, I don´t know know to see if this method is correctly called ; then, I don´t know how to fix this problem. Widget Class ...
0
votes
0answers
17 views

Filter for widget media image

There is a filter for "widget_media_image"? I'm trying to add new attributes using preg_replace but i can't find the correct filter for this widget.
0
votes
1answer
133 views

Remove links from meta widget

I've had my wordpress page hosted in a free host. This host added some code in exchange of the free service, like two links to their free and paid services webpages into my Meta widget. For me it was ...
1
vote
1answer
47 views

Making the default “Latest Posts” Wordpress Widget Show Thumbnails

I'm teaching myself how to build my own themes on WordPress. I'm using the latest version, and using the underscores starter theme. My question is, how can I make the default Latest Posts widget show ...
0
votes
0answers
36 views

WP - WooCommerce - Widget Logic

I am trying out the plugin Widget Logic. This is what I want to do: I have a filter that I want to show only on specific categories in the shop. I can use: is_product_category( array( 'cat1', 'cat2' )...
0
votes
0answers
12 views

Widgets cant be edited, solution will delete parts

I got some problems with my widgets. I didnt create the website, I am just managing the website. At the moment I cant edit the widgets. I discovered that the deactivation of “HTML Widget” helps, but ...
0
votes
0answers
17 views

Change the woocommerce widgets “SORT BY” Links to some custom links

how can i change the woocommerce widgets "SORT BY" Links to some custom links but only for Home page not rest of site Widget i am using woocommerce widget [products limit="7" columns="4" paginate="...
0
votes
0answers
26 views

How to include a video upload in a custom widget inside a plugin?

I tried to add a video upload inside a widget which is inside my plugin. I did a widget class Home_Parallax_Video which extends WP_Widget to do it based on WP_Widget_Media_Video. The form contains ...
0
votes
0answers
26 views

post__in no longer works in wordpress 5.0.3

I recently updated Wordpress to 5.0.3 and I got a problem on post__in, in particular I have this $query: $query = array( 'post_type' => array('post'), 'showposts' ...
1
vote
1answer
19 views

How to display/register widget only on post pages in custom plugin

I want to display a custom widget in my custom plugin ONLY on post pages. How can I do this without using a third party plugin or editing the theme files? is_single() does not work in the widget ...
0
votes
0answers
19 views

Woocommerce widgets don't appear on my custom template

I have created a page in Divi theme, and i displayed the shop grid with a loop. I tryied to add in the sidebar, a widget (Filter by price), but it doesn't appear on my custom page, but in the shop ...
1
vote
1answer
27 views

Newbie: Help with Vertical Spacing on Footer Widget [closed]

I'm a WP newbie here and trying to get a sense of how everything's working around WP and CSS in particular. I'm currently designing my Footer layout that has 4 Widget areas arranged horizontally. The ...
0
votes
0answers
25 views

Display the Latest Sticky Posts from a category in a widget

I could do it using a code I found, then editing it a litle bit, so i could add css classes on it. Inserted it inside "PHP Everywhere" plugin, and it worked. I made another site, with the same ...