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

learn more… | top users | synonyms (2)

1
vote
1answer
832 views

Using add_filter() in Widgets

Just have a query reference the add_filter() function. Can you use this function inside a WordPress widget class. Example I have a widget with dynamic created code that I want to pass to another ...
0
votes
2answers
525 views

Add description to custom text widget and display the 5 recent post titles

I am running into a problem where I have no idea where to add in a description so it will show up on the widget dashboard. It just keeps displaying the title. Something else I would love some help ...
0
votes
1answer
556 views

“Widgets” menu doesn't appear

I'm developing a WordPress theme, which works great on my localhost and one of my live servers, but on my other live server the Widgets menu (from Appearance) doesn't appear. And yes, all 3 servers ...
0
votes
1answer
170 views

Widget on home page displays wrong time compared to same widget on inside pages

I am trying to use the timely events calendar and I have the upcoming events widget on my home page widget area. The time that displays is not the time I have selected. When I put the same widget to a ...
7
votes
2answers
3k views

Add a custom walker to a menu created in a widget

I know how to add a Walker to a custom menu created by the theme (menu named primary in this example), but how can I target a menu thats created in a widget with the default wordpress custom menu ...
4
votes
2answers
2k views

Widget to display custom taxonomy tag cloud

How to alter the default widget to display a tag cloud of a custom taxonomy?
0
votes
1answer
18 views

add_action not working within widget() of WP_Wdiget

I have a function in functions.php function test(){ do_action('before_test_action'); echo 'in test'; } Then within my Widget, in the widget( $args, $instance ) function i use: $boolean = (...
-2
votes
0answers
9 views

Showing descriptions in Woocommerce category widget

I'd love to display category descriptions under each category in the product-category widget that comes with Woocommerce. How exactly would I go about doing so? Cheers!
0
votes
1answer
434 views

jQuery does not work in widget backend

I created a widget which should use jQuery for switching between two views and implement the jQuery UI date picker. I was wondering why my jQuery code does not work as I noticed that the date picker ...
2
votes
1answer
446 views

How to enable “shift-click to edit this widget” functionality on a custom widget?

I have created several custom widgets, modeled from the default widgets' code. The widgets all work fine, and I've been using them in production for awhile. I've been working with the new Customizer ...
0
votes
2answers
1k views

Change HTML structure for custom menu in sidebar

I've been digging for documentation on how to change HTML output for the "Custom menu" which you place in optional widget. So its clear what I meen I have attached an image of the widget block here: ...
-2
votes
0answers
18 views

A/B testing ads in a sidebar

I am new to WordPress. Could someone tell me how I can a/b test ads on blog posts on my personal blog site? Basically I have 1 ad space on the sidebar of my blog. I want to run Google ads and also ...
0
votes
0answers
11 views

Adding images in widget based on post name!

I have a wordpress blog for products, each product has a unique ID and should have a photo demonstration! I have installed the blog added the products as posts! Now I would like to add a bulk of ...
3
votes
1answer
4k views

Embed iframe or html page into dashboard widget

I was wondering if it would be possible to embed an html page or add an iframe into a dashboard widget. I have a multi author blog and i want to make my admin section a simple as possible for some of ...
0
votes
2answers
1k views

Unable to load “wpColorPicker” on theme customize page

Whether I'm using a Wordpress default theme or a custom one, I see the JS error: Uncaught TypeError: Object [object Object] has no method 'wpColorPicker' when I click "Customize" on the theme. I've ...
-3
votes
0answers
19 views

Customize Woocommerce Product Widget to show only free products

What I want to do is to show only products which _sale_price is equal to zero. I have a created a new 'case' in WC file responsible for class-wc-widget-products.php like that: case 'free' : ...
0
votes
1answer
1k views

How to echo Widget Title in Custom Frontend-Template Box

I've created a custom Widget with the help of following code: // Creating the widget class wpb_widget extends WP_Widget { function __construct() { parent::__construct( // Base ID of ...
0
votes
0answers
94 views

iframe not being displayed in a widget

I'm trying to write my first widget, so i'm not that expert with the code. I have the following code in my functions.php but the iframe is not being displayed: class account_internet extends ...
0
votes
1answer
37 views

My plugin works in home page, but doesn't work in post page

I am developing a plugin that fetches data by ajax and shows data into a table. This is my plugin code: <?php /* Plugin Name: Issue Shower Version: 1.0 */ add_action('widgets_init', '...
0
votes
1answer
444 views

Display a widget on a specific type of archive

I have two sidebar widgets, I need to display 1 widget on the archive pages for the standard post categories and the other widget needs to show on just the archive pages for a specific custom post ...
4
votes
1answer
8k views

Adding iframe Content to Sidebar Widget

I'm trying to add an Amazon advertising widget in a WordPress sidebar widget (self-hosted WordPress, v3.1.3). The widget code is basically an iframe. I've tried using the "Text" widget and pasting ...
0
votes
1answer
2k views

Sticky menu for WP custom menubars

This seems simple, except that I am not able to figure it out. In a wordpress theme, how can I make a custom menubar below the header image stick at the top after scrolling down the page? Example ...
0
votes
2answers
814 views

Widget Option is Missing

My Widget Option is missing in the Dashboard area. How can i make that appear? I have downloaded this Blank Theme from Chris Coyiers site. sidebar.php <?php /** * @package WordPress * @...
0
votes
1answer
14 views

Ampersand breaking Widget title

When adding an ampersand (&) to the Text Widget title, the title breaks at the ampersand position (frontend). So: 'me, myself & I' becomes: 'me, myself ' The ampersand is being stored (...
0
votes
3answers
11k views

<?php echo get_template_directory_uri(); ?>/images/image.jpg not working in sidebar

Hoping someone can answer this! I'm using <img src="<?php echo get_template_directory_uri(); ?>/images/image.jpg"> for my header and it is working. But when I try to use it in a ...
3
votes
2answers
816 views

Full width layout for custom post type pages

I'm trying to remove a widget area called 'Primary' from a certain page on a site. This is the function where I manage the sidebars: //ADD CATEGORIES IN SIDEBAR OF SINGLE POST TYPE add_action( '...
0
votes
2answers
474 views

Check if widget is inside sidebar with PHP

I am creating a custom theme with some widgets. In the theme, to make it easier for my client to update, I am using SiteOrigin's Page Builder plugin, which uses widgets to display content. I am ...
0
votes
0answers
11 views

Widget disappear from the right rail

I recently tagged a new version of my plugin(widget) and released it. This is a widget on the right rail, then I choose to update the plugin(widget) to the current version I released from an old ...
0
votes
0answers
6 views

How to bring widget from above menu to below menu [on hold]

I am new to this forum group and i could not attach more than 2 links in this post. So kindly refer the bold wording as my links. My website is "www.aseancrew.varma.com.my" I have used the exact ...
1
vote
1answer
522 views

Widgets not working in Customizr but working in Appearance

I'm having some trouble with my widgets. I've registered widget areas correctly; as the widgets are showing up in the "Appearance" menu. However widgets aren't showing up in the Customizr section of ...
1
vote
2answers
43 views

List authors with posts in a category

I'm trying to create a custom widget to display contributing authors for the current category being viewed on a WordPress site. I have the following PHP code: <?php if (is_category()) { ?> // ...
0
votes
1answer
10 views

Custom Widget not Available after Plugin Installation

I have created the following plugin which is intended to serve as a custom registration widget. class qfpregister extends WP_Widget { static private $login_registration_status; static function ...
0
votes
1answer
434 views

looping widgets to organize bootstrap grids

Using twitter bootsrap I want to grid my widgets if in the same position more widgets are present what I mean: having a registered widget register_sidebar(array( 'name' => __('Footer Top', '...
-3
votes
1answer
38 views

Show a specific block from PHP website as widget in Wordpress site

I am having a blog timesnews.co.uk and a phone specs site: timesnews.co.uk/phone/ Now i want to show the latest phones block from the phone specs site (located at "/phone/") as a widget on the main ...
0
votes
1answer
33 views

How to save additional user data as part of the registration process?

I've created a multi-part tabbed registration form that includes about 40-45 custom fields aside from user name, password and email. The goal is to create a new user registration and store the ...
0
votes
4answers
677 views

WAMP to XAMPP WordPress transfer

I want to switch a WordPress site from a wamp localhost to xampp localhost. Using the Tools > Export, I saved the WordPress content to an XML file. I did not create a similar backup of the MySQL ...
3
votes
1answer
10k views

Use Media upload in custom widget on wordpress 3.5

I'm creating a small widget for wordpress 3.5 that allows you to upload images. The widget is loaded correctly by wordpress. When I add the widget to a sidebar upload button does not work. If I ...
1
vote
1answer
457 views

How to add wp visual editor in a custom widget?

I am developing a widget plugin and want to add a textarea with WYSIWYG editor in widget settings. Any help would be highly appreciated. Thanks.
0
votes
2answers
2k views

How to retrive widget title/data

I'm using this code to display widgets of certain sidebar: $sidebar_id = 'sidebar1'; $sidebars_widgets = wp_get_sidebars_widgets(); $widget_ids = $sidebars_widgets[$sidebar_id]; foreach( $...
-1
votes
3answers
628 views

Display widget outside sidebar?

I want to display a widget outside the sidebar, but I can't get my code to work. The theme name is radius-primary-sidebar and my widget id is text-20 (according to the html in the admin page. See ...
1
vote
1answer
32 views

How to create Blog Post Specific Widget

I want to create widgets which will display based on post. I have considered the option of creating a widget post type using Advanced custom post type plugin and populate this widget while writing ...
0
votes
0answers
14 views

Hide pages + widget edit

I have 2 questions on this site i have this item i was wondering how can I make this item not show in the widget area or any other part of the site but still be accessible if some1 has the link to it ...
-3
votes
1answer
18 views

How to create a custom widget in dashboard that shows stats for custom post type

I have a custom post type called Locations. I want to create a widget in the dashboard that shows number of posts in that post type, post taxonomy and number of item in each taxonomy. Any ideas?
0
votes
0answers
16 views

Ajax interfering with widget back end Javascript

I have a plugin that creates a widget that allows users to click a button and select an image. I have noticed that immediately after the widget is dragged and placed into a widget area, two Ajax ...
0
votes
1answer
22 views

Output dynamic_sidebar_params in wp_head

I have created a custom widget with a color picker field. Currently there are two ways to output the color picker value for this widget: Inline style. Using the dynamic_sidebar_params filter. With ...
1
vote
2answers
42 views

widget should display post archive by year and on click also by month

I want to display the post archives like seen in this picture. Shown by year and on click it should open up the months. I am not sure how to approach this, would you customize the standard WordPress ...
1
vote
0answers
44 views

Modify 'Sizes' Attribute for Images with Specific Class

I'm ultimately trying to add useful responsive image srcset & sizes attributes to images added in a standard Text Widget. I've found this filter which does allow images to get the default WP ...
13
votes
2answers
2k views

Executing Javascript When a Widget is Added in the Backend

I have widgets that have javascript controls attached to them. If the widget is present when the widget admin page loads, the controls work correctly. When I add a new widget, they do not work ...
2
votes
0answers
102 views

Widget area inside a widget

I tried putting dynamic_sidebar('widget-id') inside a custom widget I created and it worked. The only thing I can't figure out is how I can do this through a loop. Is there a way that when the widget ...
0
votes
1answer
55 views

Widget Script Loads at Bottom of Page

I've been working on a plugin that adds a script to the sidebar when activated. So far, I've been able to display the code, but it loads at the bottom of the page and not in the sidebar. I'm pretty ...