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

learn more… | top users | synonyms (2)

0
votes
0answers
16 views

Change widget: categories to tags

I have a theme with a widget that displays posts from a category. How can I change it to tags? This is the code: /** * Plugin Name: Middle Buzz Widget */ add_action( 'widgets_init', ...
0
votes
2answers
644 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: ...
3
votes
1answer
28 views

Adding widgets programatically: how to avoid collisions?

I am developing a theme, and I'm trying to add widgets programatically to its sidebar. I read this excellent answer: http://wordpress.stackexchange.com/a/51086/14225 But there's one thing I'm not ...
0
votes
1answer
381 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
18 views

Twenty Fourteen: how do they populate by default the sidebar?

My question is pretty similar to this one: How can I insert default widgets when my theme is activated (similar to what twenty eleven does)? Except that it's for Twenty Fourteen. I'm trying to use ...
1
vote
1answer
1k views

Widgets menu does not appear under “Appearance” in dashboard

I am developing a WordPress theme, but am stuck on widgetizing my theme. I have followed several tutorials but still cannot get it to work. My widgets menu does not appear under Appearance in my ...
5
votes
5answers
5k views

Using widget options 'outside' the widget

I want to save some parameters in the widget options which are then passed into another page. The widget is a form which calls a webservice. The options I want to pass are the authentication for the ...
0
votes
1answer
18 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 ...
-1
votes
1answer
16 views

How do I insert a photo at the top of the sidebar?

http://www.beautybykatlin.com/ Hello, How do I add an image at the top of the sidebar? I had one there but I deleted it and I don't know how to get it back. Please help!!! Thank you!
0
votes
1answer
15 views

using get_template_part() inside a widget and passing variables

I read that get_template_part() should only used by themes not plugins, I don't know if using it inside a widget function (created by the theme) is considered as a plugin or not. Anyway, I'm trying ...
0
votes
1answer
14 views

Making jQuery .change() event persistent after widget save

I'm creating a custom widget that uses a select element with a bunch of options and a simple jQuery function to trigger the visibility for some <div>s below it based on the selection, through a ...
0
votes
0answers
8 views

MYSQL ignore categories on Wordpress widget

I have this WP widget that pulls random products from the DB. What I really want is to be able to include just a few products categories (or exclude). Can anyone help me? I appreciate. <?php ...
0
votes
1answer
20 views

passing variables inside a widget add_action

Here's my code inside a widget class: function widget($args, $instance) { add_action('wp_footer', function () { echo $instance['title'] }); } It doesn't output $instance['title']. I tried passing ...
0
votes
0answers
4 views

Nested widgets in widget.php

Anyone here accomplished that? I've seen a theme that did this before but can't remember it. It allows you to drag a widget inside another widget in widgets.php, giving you the ability to create ...
3
votes
2answers
669 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
1answer
12 views

three sidebars showing without call

code from template where i call header sidebar <div class="wrapper"> <?php get_sidebar("header"); ?> <div id="switcher"> widgets.php has following coding... <?php if ...
6
votes
1answer
3k views

How to store widget fields data as an array?

I am creating a widget, it needs to store about 10 IDs. Right now I'm using following field method to store each of the ID in a separate field. It stores data of each field in a separately in the ...
0
votes
2answers
22 views

Output column number according to active sidebars

$sidebars = array( is_active_sidebar( 'footer-4' ), is_active_sidebar( 'footer-3' ), is_active_sidebar( 'footer-2' ), is_active_sidebar( 'footer-1' ...
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 ...
1
vote
1answer
544 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
1answer
544 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
12 views
1
vote
1answer
20 views

Remove All Widgets from Sidebar

Does someone know a solution for this? I want to remove (not unregister) all widgets from a sidebar with a function.
0
votes
0answers
19 views

Hide specific categories from category widget

I'm trying to hide a large amount of categories from my category widget. I've tried a few plugins but none of them seem to want to let me use the dropdown option. I looked into the ...
0
votes
2answers
350 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 ...
0
votes
1answer
21 views

include exception inside theme for empty widget area

Im using Storefront-paper theme for a blog, and for my sorprise, sidebar.php include a code to block possibility to have empty widget area. In this case I would like to use a page how front page, ...
0
votes
0answers
8 views

How to load individual widgets within sidebar(Not all at once)

I want to load my Wordpress site sidebar widgets when scroll down. So I want to know how to load individual widgets one by one. I tried plugins like 'Lazy Widget Loader'. But they didn't work for me. ...
0
votes
1answer
16 views

Radio buttons in widget not saving

I am struggling with a common issue that many people appear to have encountered over the years. In creating a widget I need a series of radio buttons. Using the code below I can create and show the ...
0
votes
2answers
35 views

Warning: Missing argument 2 for widget_title filter

Based on this question, I'm getting an error Warning: Missing argument 2 for.... This happens for some widgets those are created by plugins. -- Edit 1 -- Here's a simple widget that causes the ...
0
votes
0answers
6 views

Missing argument 2 for remove_widget_title() [duplicate]

I'm using both these functions: function widget( $args, $instance ) { // Widget output extract( $args ); $title = apply_filters('widget_title', $instance['title']); echo ...
0
votes
1answer
485 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
11 views

Get plugin option number from WordPress widget

[7]=> array(15) { ["title"]=>string(0) "" ["labelone"]=>string(0) "" ["labeltwo"]=>string(0) "" ["group"]=>string(0) "" ["member"]=>string(0) "" ...
0
votes
1answer
22 views

How to make featured area?

I'm trying to make custom wp theme, but i have one thing that i don't know how to make. I would like to make featured area on my page like this for example: http://prntscr.com/7gespg I made widget ...
0
votes
0answers
22 views

Display “A week from today” function [migrated]

I am trying to edit a php file from this plugin https://wordpress.org/plugins/sportspress/ The plugin currently has a widget that displays all events from THIS week, but what I am trying to do is show ...
1
vote
1answer
14 views

WordPress Plugins won't save

I have a WordPress website I just took over for a client so I don't have the ability to talk with the previous webmaster / the developer. The site is using a slightly modified version of the Subway ...
0
votes
2answers
394 views

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

I just started coding and working as an intern for a company. My boss asked me to create a custom text widget for practice in making word press widgets. The problem I am running into is I have no idea ...
-1
votes
1answer
43 views

How to develop an extension for a simple form post and post back? [closed]

I need to develop a plugin/widget or any kind of extension for WordPress that is a like a static page and is like a Form. In this page I have a form with some input fields that is submitted to server. ...
0
votes
1answer
52 views

Hide first blog post in content and output it in widget

I am working on a theme and want to hide the first blog post and instead output it at a custom widget position. For that I created a variable in the functions.php called $postCounter. I accessed ...
1
vote
1answer
36 views

How to check if widget has automatic title

Some default widgets has automatic titles. Is it possible to check if widget has automatic/inserted title using dynamic_sidebar_params filter?
0
votes
1answer
14 views

Checking if widget has title not working

Here's my function which is not working: function ts_dynamic_sidebar_params($params) { global $wp_registered_widgets; $settings_getter = $wp_registered_widgets[ $params[0]['widget_id'] ...
0
votes
2answers
563 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
0answers
10 views

displaying page attachment image in custom widget

So I have this custom widget where you can select a page from a dropbox and the widget will lead you to this page. The problem is i have no idea how to display the page's attachment image. ...
0
votes
1answer
438 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
0answers
8 views

How can I add page-level settings to a widget?

I've authored a widget that has settings on the widget page, and works correctly. I would like to add the ability to set an override for the widget's settings on a specific page or post. I'm imagining ...
0
votes
0answers
5 views

Select a widget from appearance menu

i'm creating a mega menu in WordPress and i need to add a widget field to select a widget area form appearance menu than show the selected widget width the_widget( 'widget_name' ) function
0
votes
3answers
202 views

how to display custom widget anywhere in wordpress

i've a custom widget for ads,it helps me to show ads on sidebar but i'm trying to display it under every single post or on front page near to slider. <?php the_widget( 'AdWidget_300' ); ?> ...
0
votes
0answers
23 views

Widgets: Ajax Filtering and Add rewrite rules

I have built an Ajax filtering plugin for my widgets that works by adding url params through jQuery (when a link is clicked) and having pre_get_posts $_GET these values. These values then setup the ...
1
vote
2answers
5k views
0
votes
0answers
23 views

Call outside functions to within wordpress widgets class

Hi i'm created widget for show soundcloud clips, and i'm created a function in function.php file to create info link within widgets to show explain images to how get clip id in bootstrap modal style. ...
0
votes
0answers
16 views

display widget areas by adding standard code to page address

How to view all the widget areas on a page by adding code to page address... Some time ago I saw a tutorial video on WordPress that explained how to highlight all the widget areas available on a ...