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

learn more… | top users | synonyms (2)

1
vote
1answer
34 views

How can hide widget title if custom widget is empty

I created my Custom Widget with a category filter select. The widget show me the related posts of the current taxonomy term and filter by the selected category. I would like to hide the widget title ...
0
votes
1answer
22 views

how to run a php code in widget?

I have a code to get all taxonomies and terms for a single post: $object_terms = wp_get_object_terms($post->ID, 'staff', array('fields' => 'all')); if ($object_terms) { echo '<p>' . ...
0
votes
0answers
14 views

Modify default widgets

i want to add a class to the link inside the footer widgets. how can i do that ? I found a way to add a class to the widget it self but not to the link inside of it ! The concerned widget are ...
0
votes
0answers
4 views

How to add images to widget instance from backend

I am working on a project which has content(no posts) and I want to give complete control to user to change and edit content from admin panel. I have created widget added fields to it but I don't know ...
1
vote
1answer
16 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 ...
1
vote
1answer
36 views

Custom Widget Creating PHP Exception When Placed In Its Own PHP File

I have a custom plugin created and i have created a widget. At the moment this code is included in the base php file for the plugin and its working fine. I want to move the widget and all future ones ...
0
votes
0answers
9 views

WordPress returns incorrect timestamp in drip-feed widget

First off, yes I have contacted s2member support on this topic, but they have not been super helpful. Additionally, I'm not convinced this is an s2member plugin issue. Ok here goes: I'm working on a ...
0
votes
0answers
11 views

Get the sidebar title outside widget

I want to find a way to get the sidebar title outside of the widget area. My actual functions file: if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => __( ...
0
votes
1answer
32 views

Widgets Opening In New Window - Unwanted

I am dumbfounded as to why my sidebar image widgets are opening links in a new window when I do not have the "open link in new window/tab" checked off. The box is blank. My page is ...
0
votes
1answer
13 views

How to call theme default widget in custom template?

I have default widget available called "Recent Post" created by theme. I want to call that widget in my custom template which I made. I am trying in following way , But that is not working. ...
0
votes
0answers
11 views

How to store 3 widget fields data as arrays?

I am creating a widget and each items needs to take three values. The first one selected by a select and the two others with inputs text. The widget allows the user to add multiple items but the ...
0
votes
0answers
8 views

Hooking into action that fires in wp_head from widget on front end [duplicate]

I have a custom action hook for which the do_action() is executed in a function that hooks into the wp_head action. I would like to run add_action() for that custom action hook from the front-end ...
0
votes
0answers
24 views

How to add google plus icon like on the first image below on wordpress

How to add google plus icon like on the first image below on wordpress? We have the social media icons for FB, twitter and linkedin. However I need to add the social icon for google plus (in circle ...
0
votes
0answers
12 views

Theme Customizer not recognizing Widgets

First of - i do not know much coding, though i do learn quickly and am looking to get this issue sorted ASAP. I am sure it is something simple. When i load up my site in the Wordpress Theme ...
0
votes
1answer
25 views

How to Register and Display Widget for Custom taxonomy

I have registered a Custom Taxonomy Named as Album, Now i want to register and display a custom widget like category to display recent 'x' albums with thumbnail on my sidebar. Below is a piece of ...
2
votes
1answer
17 views

How to listen to color changes on the color picker?

I am trying to run some custom jquery function every time the colorpicker's color change. The colorpicker is include as part of the WP core. I have been looking at the JS code, but I can't figure out ...
-1
votes
1answer
38 views

How to show Wordpress Dashboard Widgets on Frontend?

I want to use Wordpress Dashboard Widgets as it is easy to add new widgets and automatically have the functionality of drag and drop, changing the order, showing and hiding widgets and also ...
0
votes
0answers
20 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', ...
3
votes
1answer
44 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
23 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
votes
1answer
17 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
19 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
1answer
25 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
19 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
9 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
29 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
14 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 ...
0
votes
2answers
25 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' ...
1
vote
1answer
21 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
1answer
16 views

How Can I Register Menus and Widgets Conditionally Based on Theme Options/Settings?

I have theme options/settings page and options/settings fields set as outlined here: ...
0
votes
0answers
26 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
1answer
22 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
11 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
25 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
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
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
25 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 ...
1
vote
1answer
15 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
39 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 ...
-1
votes
1answer
46 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. ...
1
vote
1answer
37 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
19 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
0answers
13 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
0answers
10 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
6 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
0answers
26 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 ...
0
votes
0answers
30 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 ...
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 ...
0
votes
1answer
35 views

Active Sidebar Conditional Question?

I have the following code that works but doesn't look good: <?php $col = 'one'; if( is_active_sidebar('footer') && is_active_sidebar('footer-2') && ...