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
8 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
15 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
1answer
26 views

Fatal error: Uncaught Error: Call to undefined function get_home_path()

EDIT, I've taken some custom SiteOrigin Page Builder widgets out of a theme and placed them in a new custom plugin. In the main plugin file, I have: require plugin_dir_url( __FILE__ ) . 'hdr003.php';...
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
25 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
14 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
9 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
11 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
13 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
0answers
21 views

Changing Theme for my needs [closed]

I have new empty site with new empty theme on Wordpress. It is simple portfolio site with several pages. Main information located mostly in theme files (in blocks). These blocks are not simple html ...
0
votes
1answer
20 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
13 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
13 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 ...
-1
votes
0answers
14 views

Full Width, coloured horizontal bar, responsive design, theme questions

It's quite common these days to see this kind of design : example 1 example 2 That is... a page made up of full width horizontal coloured sections. Both of those sites are wordpress using custom ...
0
votes
0answers
23 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
23 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
34 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
21 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
18 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
22 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
20 views

Collapsible widgets [closed]

asdasdasdasdasdasdasdasdasdasdasdasdadasd
0
votes
1answer
17 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
23 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
11 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
22 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
14 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 ) { $...
0
votes
0answers
15 views

Convert PHP/Javascript to Widget

I'm going to preface this by saying I am new to Wordpress development, and have never had to use AJAX or JQuery, which if what I have read is correct, this should be able to be accomplished with. The ...
0
votes
0answers
7 views

How to show other options when selecting certain option on custom widget?

Please have a look at an image and you will understand my problem clearly. I have custom widget to display the posts. As you can see image, i have layout of posts listing. Layout One and Layout two. ...
1
vote
2answers
35 views

Show post number in widget loop

It works in the category.php loop <article> <p>post-<?php echo $wp_query->current_post +1; ?></p> </article> <article> <p>post-<?php echo $wp_query-&...
0
votes
0answers
47 views

Make bootstrap carousel dynamic in Elementor Widget

I want to have a quick solution. I am not good at backbone.js so I am getting little trouble here. Here is my code: https://pastebin.com/KB4vhkkY I have made a widget for Elementor for a bootstrap ...
1
vote
1answer
51 views

How to save widget fields generated from an array?

I created simple php abstract widget class that can generate form with fields from an array. When I try to save fields, all changes are removed. Abstract Widget Class: <?php /** * Abstract ...
-1
votes
1answer
14 views

Jetpack 'Blog Subscription' widget doesn't add emails to

I'm trying to use the jetpack 'Blog Subscriptions' widget, but any emails submitted with this widget aren't being added to the followers list. Verification emails aren't being sent to the subscribers ...
0
votes
0answers
16 views

How to allow publishers to set an article on homepage

I have a wordpress with publishers. -All publishers should be able to (re-)define one article as "homepage article"; -Only one article can be defined as "homepage article"; -Publishers must not ...
0
votes
0answers
17 views

Rewrite html of widget display-posts

I use the widget display-posts with this shortcode: [display-posts category_display="true" category_label="" category="homepage" include_excerpt="true" excerpt_length="200" include_excerpt="true" ...
-1
votes
1answer
9 views

Recent posts with different class name for each post and a scrollbar?

So far i found a widget ("Ultimate Posts Widget") with different class name for each post but it has no scroll bar.. any other widget suggestions ?
0
votes
0answers
9 views

Can view Social Media buttons only in the private mode - why?

I can view and click all the Social Media buttons: Twitter, Pinterest, Google and more plus the Like button in the footer but only when I am in a private browsing. If I browse as usual (not private) ...
0
votes
0answers
107 views

Woocommerce recently viewed products and page caching

I am currently using Hummingbird to cache my pages and I also use the Woocommerce recently viewed products widget. I am currently having to exclude my homepage from caching as when caching is active, ...
1
vote
0answers
9 views

Conditional Tags Based on Previously Viewed Posts

I was looking at the Conditional Tags Archive and was wondering if it's possible to show a widget depending on different posts / pages a visitor has previously viewed. For example, if I had a car ...
0
votes
0answers
15 views

Add fields to the top of widgets form

i have read this and create custom fields : How to add Custom Fields to Settings in Widget Options for all Registered Widgets? but i want to add this custom fields to the top of all other fields . (...
0
votes
0answers
13 views

How do I edit WordPress widgets?

I want to add title and alt attributes to links in the WordPress tag cloud widget but I don't know what to do. Can someone help with this? I've looked at the /wp-includes/widgets/class-wp-widget-tag-...
0
votes
0answers
18 views

Showing siteorigin widget on category page view

I am using the plugin Page Builder by SiteOrigin and I am modifying my category page to render a snippet of one of my custom widgets inside the single view. How would i render just a specific widget ...
0
votes
0answers
26 views

Siderbar implementation with collapsible bootstrap cards

I'm trying to implement collapsible Bootstrap 4 cards on sidebar widgets, until now I have this: register_sidebar( array( 'name' => esc_html__( 'New Sidebar', 'ns' ), ...