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

learn more… | top users | synonyms (2)

0
votes
3answers
583 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 ...
0
votes
2answers
509 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 ...
1
vote
1answer
426 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.
1
vote
2answers
108 views

How to run PHP code in Text Widget with no plugin in WP 4.4

Before I had the following code in the function.php add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); ...
2
votes
1answer
74 views

How can i make WP_Query return post image and categories?

I have a sidebar widget that will display related posts based on a custom meta field. The query works, but its very wasteful. All i need is the post title, featured image and the categories of the ...
-2
votes
1answer
437 views

How to add an image as a bullet point in a specific WordPress widget? [closed]

I am using a widget to show latest tweets in my blog. The widget shows latest tweets as a list item. The default list bullet point (black square bullet point) of the theme is shown. I want to change ...
-1
votes
1answer
24 views

How do you submit a widget for the wordpress directory?

Looking for this process but for Wordpress: https://developers.google.com/blogger/docs/gadgets/gadgets_for_blogger#testing-style-fonts-and-colors Thanks.
0
votes
1answer
8 views

How do I create a 'selection' criteria list' that will then dictate which posts are generated when the user presses search?

I'm very new to WordPress so please bear with me! I'm currently in the process of building a site for work. Our 'vision' is that we have three lists of options. People would select one option from ...
1
vote
1answer
26 views

How can i use the same template file with a widget and category loop?

i wrote a widget and i want to use category template which is located in "themename"/template-parts/content.php". <?php // Category.php while ( have_posts() ) : the_post(); get_template_part( ...
3
votes
4answers
189 views

Limit widget to a specific registered sidebar

I have a widget I want only allowed to be used with the single.php sidebar. When I referenced the codex for register sidebar there isn't a way to limit widgets in the array. I've researched with ...
1
vote
2answers
26 views

wp_editor in widget breaks after save (no buttons and visual tab broken)

My goal is to get wp_editor working in a simple widget which the admin can use to add text content on an admin options page. Here we go in wp-admin/widgets.php everything looks sooo good right. ...
4
votes
2answers
4k views

How do i manually place a widget code

is there a way that i can place a certain widget any where on the site. For example: I'm using the text widget in my sidebar, for the title i put youtube, and i placed the youtube embed code in it. ...
6
votes
3answers
1k views

Call dynamic_sidebar but include/exclude named widgets?

Is it possible to include or exclude specific named widgets that are assigned to a named dynamic_sidebar call? For example, if I've registered a sidebar named "my_sidebar" and the user had placed a ...
6
votes
1answer
3k views

How display widget by id

I fetched widget id this way: $the_sidebars = wp_get_sidebars_widgets(); print_r( $the_sidebars['sidebar-1'] ); It shows: Array ( [0] => recent-posts-2 [1] => recent-comments-2 [2] ...
0
votes
1answer
19 views

How to append custom text to the output of 'categories widget'?

How do I customize the "categories widget" to append additional text on the sidebar display? from category 1 category 2 category 3 category 4 to category 1 folder category 2 folder category 3 ...
2
votes
1answer
28 views

How to exclude certain widget from showing up on home/front page? [duplicate]

Without using a plugin, how do I prevent/exclude the sidebar widget "recent posts" from showing up on the home/front page? I do want it to show on the sidebar of rest of other archive/post pages.
1
vote
1answer
875 views

Multiple entries in get_option results? or why is _multiwidget set to 1?

I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some ...
0
votes
1answer
29 views

Widget text color change

hello i have this site and in the footer section there is the recent posts widget with the grey colored text. I wish to change it to white, i tried adding some custom css code in the theme child with ...
5
votes
2answers
3k views

Is there any way to dynamically alter widget titles?

I have a case where that are a lot of widgets in several custom sidebars. I am wondering if there is a simple way to alter the titles of each widget dynamically. Typically a widget has a title field ...
1
vote
4answers
582 views

Cannot save widgets in custom sidebars

I'm working on a child theme of the Toolset Bootstrap Theme. I need to create a custom sidebar, so I registered the new sidebar in my child theme's function.php file: function ...
0
votes
1answer
17 views

wrapper div for widgets not showing with all widgets

I have registered a Widget area with the following code: // Register Sidebars function custom_sidebars() { $args = array( 'id' => 'footer_sidebar', 'class' ...
-1
votes
0answers
19 views

I have created custom image widget but image is not showing in the sidebar of my theme [on hold]

Here is my code, add_action( 'widgets_init', create_function( '', 'register_widget("pu_media_upload_widget");' ) ); class pu_media_upload_widget extends WP_Widget { /** ...
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 ...
-1
votes
1answer
24 views

Woosidebars adding full page navigation on bottom

So, when i add an woosidebar to my woocommerce pages, only with the woocommerce product category widget, it shows it correctly on my right sidebar just like i wanted, but it also adds a search box and ...
0
votes
2answers
768 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
531 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
0answers
35 views

How to include JavaScript script only on specific page [duplicate]

I am creating my own widget. I need to use custom css and js files. I have used wp_register_style`wp_enqueue_styleandwp_register_script\wp_enqueue_script` functions in order to register custom styles ...
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: ...
1
vote
1answer
793 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
927 views

how to remove the default title of Categories widget

hi i'm using the Categories widget show hierarchy. I leave the space for title because I don't need to show any title. but it then displays on the website as "Categories". how can I remove that?
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 ...
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
0answers
18 views

WP 4.4+ Responsive Image Markup in Text Widget?

I'm slowly wrapping my head around the new responsive images features in WP 4.4. I've got it fairly well figured out now for our CPTs & default page/post content images. But is there a way to ...
0
votes
1answer
29 views

Adding classes to dynamic sidebar

Hey so I am trying to create this conditional that auto creates a grid layout when widgets/sidebars are added and removed. The goal is let the user put in as many widgets as possible without worrying ...
1
vote
1answer
127 views

Adding inline styles from a widget

I'm working on a theme that has an optional widget to allow users to put some site elements where they want. One of those is a list of social media icons. These are font icons, so they can be styled ...
0
votes
0answers
17 views

Widget save brake jQuery [duplicate]

I have created a plugin that creates a widget. On the widget form i am using jquery functions that i load using wp_enqueue_script. When adding the widget on a sidebar, everything works. Then when i ...
0
votes
1answer
140 views

How to add WooCommerce Add to Cart button in widget?

How can I add a separate WooCommerce widget, with the Add to Cart button and its options, so I can display it anywhere in the sidebar of the product details page?
0
votes
1answer
15 views

Wordpress add css class to cloud tag anchor tag

How to add CSS Class to ul and anchor element of Tag Cloud generated through wp_tag_cloud function. I want wordpress default class for ul 'wp-tag-cloud' to be 'tag-cloud' and anchor tag would have '' ...
0
votes
2answers
40 views

display widget checkbox selection on frontend

I create a widget for a custom post type that will display a list of post in the widget area. it works fine, i can select multiple posts and save the widget but i can not get it to display on the ...
3
votes
2answers
789 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( ...
1
vote
3answers
972 views

Post-specific widgets in Wordpress 'Twenty Fourteen' theme

Using Wordpress 3.8.1 with 'Twenty Fourteen' theme I'd like to arrange my post in such a way that it's main contents go to main (center) column while galleries, attached files and links pertaining to ...
0
votes
2answers
123 views

How to remove a widget from the sidebar on specific page?

I want to remove a widget from page with id '28'. How can I do it? I have found function for it, but it is private function, so I can't use it. "wp set sidebars widgets This function's access is ...
2
votes
1answer
62 views

How can I reuse the Wordpress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it ...
0
votes
0answers
18 views

How to remove extra space from li of wordpress widget?

I am building a some WordPress widgets. During this I am facing some problems. When I am using <ul> <li> then my layout taking some margin or padding, but when I am using <td> or ...
1
vote
1answer
26 views

How can I apply css styling to the current day in the calendar widget

How can I apply css styling to the current day in the calendar widget? It seems there is no css class for the current day.
0
votes
4answers
625 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 ...
-4
votes
1answer
45 views

Widget won't work due to old JavaScript? Any ideas how to make it work? [closed]

I was trying to add this widget to my blog <!--BEGIN PROFILE WIDGET--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" ...
0
votes
2answers
1k 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( ...
0
votes
1answer
20 views

Widget settings disappear after refreshing page

I am developing a plugin that displays your average Google My Business rating in a widget. Everything works fine, except when I close the widgets page and return to it later (or do a plain refresh) I ...
0
votes
2answers
2k views

Current theme broken - after server and domain migration

I'm migrating a Wordpress install and trying to get down the correct process for doing so. I've tried using the method I thought would work, but it didn't. My files and database are in place, but ...