Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [widgets]

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

0
votes
0answers
19 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
39 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 ...
-1
votes
0answers
11 views

Adding widgetized areas to a child theme - works on clean site but not live site

I need to add a widgetized footer to a theme for my client. I couldn't create a staging site because of memory usage on their hosting account, so instead I set up a clean WordPress install, created a ...
0
votes
1answer
33 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
21 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
29 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
20 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
25 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
15 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
16 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
26 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
7 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
15 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
56 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
29 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
25 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
16 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
18 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
18 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
14 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
19 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 ...
0
votes
0answers
10 views

Cynamic_Sidebar Content Storage

I'm trying to refresh my test environment with current data from my production environment and after copying the wp-content file structure and database, I noticed the sidebars didn't seem to update. ...
0
votes
0answers
13 views

Add brand banner on filtered page

On the e-shop, the user has the ability to filter a product category by brand-manufacturer. Though, I would like when the user selects to see brand X, to display a banner from manufacturer X on the ...
0
votes
0answers
19 views

Vue js not working in WordPress Widget

I am trying to use Vue js in one of my widget. There are select, input fields in the widget which is inside form() function. But the code is not working, there is no error on console as well. Button ...
0
votes
1answer
22 views

How to make a “page-option” in WordPress

I had made a WordPress website with my own theme. I have a navigation menu on the top of my website with dropdowns. Then you click on a page in this menu, I want you to navigate to a page, where ...
0
votes
0answers
15 views

Dashboard Widget 0ptions with one too many options - how to unset/remove?

WP 5.1 Using code based on Codex Example Dashboard Widget I mistakenly renamed 'example_number' option as 'number'. I then renamed it as 'example_number'. I also have some other options as checkboxes ...
0
votes
0answers
9 views

Insert a video gallery on the homepage

I would like to insert a video gallery on the homepage of my website, driverapplondon The same as in this image. Could you help? Thanks.
0
votes
0answers
10 views

DropDown_Nav_Menu that is extending Walker_Nav_Menu, but it is not compatible with original class

I think it is because it is an old version of the widget but I cannot get an update.Is there some way round this problem that you would know of.Thank you for your help
0
votes
0answers
12 views

Need to remove a piece of copy that appears to be in a sidebar but doesn't show up

I cannot find the type shown in these 2 screen grabs. Can anyone point me to where I can access and remove it? html code picture
0
votes
0answers
18 views

Create custom slider from a Gallery widget

it's been quite a long time since I've been working with Wordpress, and I've never done anything like this with it before, and I also googled my arse off trying to find a solution, but couldn't. So, ...
0
votes
0answers
14 views

Shortcode generated widget to appear on same line as heading text and button

I've been struggling with this one for a while now, with very little CSS or HTML skill. As you can see on my staging site, (http://staging.kempen-design.com/ewc) I have a top notification bar, where ...
0
votes
0answers
24 views

Add fields to edit in custom widget

I'm coding my first theme. I want to have class event editable in Admin Panel as a widget. I don't know how to declare this widget in functions.php to keep my hierarchy and class names. <div class=...
0
votes
0answers
35 views

How to edit wordpress widgets?

I am developing a wordpress theme which will be sold out to users on some marketplace. I was finding a way to edit Wordpress widget. And I found that and from here all the code is available in /wp-...
0
votes
1answer
44 views

How To Create Dynamic Permalink To Custom Taxonomy List of Current Posts?

I'm looking for help with a problem I've run into and can't seem to workout myself. I have created my own custom taxonomy called series (code below). I am calling the custom taxonomy posts in a widget ...
0
votes
1answer
22 views

How can to use the players from the Media Widgets in the body of a post to play audio and video files

I've been trying to use the <audio> tag to play MP3 files and the <video> tag to play MP4 files, both with the controls attribute, and they work fine, but it isn't possible to apply custom ...
0
votes
0answers
24 views

WordPress Tag Cloud Filter Prevents Widget HTML from loading

I have a sidebar in wordpress registered like this: register_sidebar( array( 'name' => 'Blog Sidebar', 'id' => 'blog_sidebar', 'before_widget' => '<div ...
0
votes
0answers
11 views

Is it better to embed widgets on posts or pages?

I am seeking to create a member site with category hierarchy....Is it better to use posts or pages for the category hierarchy and widgets that show new groups etc..? Phila ...
0
votes
0answers
26 views

Custom Plugin used for creating widget feat ACF

I'm building a plugin that it needs to create a widget with some custom fields. I'm not an expert, this is my first plugin, but I'm interested to learn on how to develop more plugins. My problem is ...
0
votes
0answers
14 views

Developing Widgets For video

i'm looking for developing widget for my wordpress theme to show video post in the sidebar with video image thumbnail the category,type,video number, the widget_id, i read the documentation in codex ...
0
votes
1answer
15 views

WP renders HTML wrong when adding widgets

Here is my code for a footer. Footer element should have div.footer-widgets, nav, and p elements as children. But for some reason wordpress puts everything to div.footer-widget element (I've included ...
0
votes
1answer
21 views

Collapsible widgets [closed]

asdasdasdasdasdasdasdasdasdasdasdasdadasd
0
votes
1answer
18 views

Recently changed domain name. Home page widgets are now not in the customize menu yet still being on the page

I recently changed the domain name on my wordpress website. Since doing so I am unable to edit the current widgets I have on the home page. They are still on the actual home page however when I go ...
0
votes
1answer
33 views

How to customize a section of a widget only on certain pages or page

I am using the twentynineteen default Wordpress theme but I would like to know how I can remove this line <?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?> only on certain ...
1
vote
1answer
23 views

How to add multiple custom widget areas

I'm looking to add multiple widget areas to a page in my theme as id like to have widgets within certain pages. I can add one using this code, I'm just struggling with a second. function ...
0
votes
0answers
24 views

How to custom a widget class in Style.css file?

I am a newbie here. I could custom a feed via widget/RSS plugins or additional CSS. But while I add directly in style.css, it didn't work. I have read a similar question "Custom CSS for a particular ...
0
votes
0answers
15 views

How to use widget options as a shortcode?

I have function that convert widget options to shortcodes args. abstract class MOD_Widget extends WP_Widget { [...] [...] public function params_to_shortcode( $params ) { $...