Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
1answer
286 views

Widgets not displaying in theme customizer

I am developing a new theme and I am using several sidebars in this theme. All works fine, but the widgets are not showing up in the theme customizer section. All widgets are working fine under ...
0
votes
1answer
142 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', ...
1
vote
1answer
28 views

Uses Cases for the Calendar Widget

So I've looked at several themes and visited several theme dev sites and i'm confused about the "purpose" of the WordPress Calendar Widget. So it states it is... A calendar of your site’s Posts ...
0
votes
1answer
113 views

List sibling pages widget, exclude current page

I successfully created a widget that displays sibling pages to the current page I'm on in the sidebar. Only thing is, I'm not capable of excluding the current page - can someone please assist here? ...
0
votes
2answers
128 views

Remove/Unregister or hide a widget added by a plugin

I'm trying to figure out how to remove wordpress widgets added by plugins. I know there are a couple of plugins that do this, like https://wordpress.org/plugins/wp-remove-widgets/ and ...
0
votes
0answers
57 views

Question about file path for include/require methods

So I am currently rather new to Wordpress development and I had a question about the file path for the include() and require() methods. I have a php script within my Wordpress installation that I ...
0
votes
1answer
24 views

Filter on widget-title does not work with custom links

I added a filter to my widget titles and it looks like the filter doesn't apply on links, which are created with the links-sidebar. It does work perfectly on the blogroll or search widget Here's a ...
0
votes
0answers
26 views

Widget Logic - Target 1 URL

TestSite.com/?property=Name How do I target only this URL with conditional tags and widget logic. I've tried is_singular( 'Name' ), but that didn't work.
0
votes
1answer
46 views

How to set the default value as the saved value once a form of widget is saved?

I tried doing this for the function form : <?php function form(){ //Set up some default widget settings. $defaults = array( 'uid' => __('121232', 'example'), 'height' => ...
0
votes
1answer
31 views

can't edit widgets after moving from subfolder to root

I had some issues with migration: childtheme that was ranamed and working was automatically renamed back + a lot of wrong absolute apps from even older version on site... Now, after I fixed everithing ...
1
vote
1answer
49 views

Create variable from widget instance

Is it possible to return a widget instance into a variable or array? I'm thinking something along the lines of $widget['title'], $widget['content'] etc. I have tried inspecting the global ...
1
vote
1answer
49 views

Which settings/options are saved on a theme-basis and how does this affect theme-switching?

I realized that when switching the theme (in my case to a child theme) some things don't stay the same: Widgets Menus At least this is what I found out so far: Widgets Don't lose widgets when ...
5
votes
1answer
103 views

Why is the $old_instance needed for the widget update function?

In the PHPdoc of the function WP_Widget::update() located under wp-includes/widgets.php it says the following: /** * ... * This function should check that $new_instance is set correctly. * The ...
0
votes
2answers
148 views

Override custom menu widget

I would like to override some mark-up and css (like <div class="soma_container"><ul class=""></ul></div>)styling on a chosen custom menu widget. How would I do that? Should be ...
0
votes
1answer
137 views

Removing side bar widgets from GovPress theme

I'm using the GovPress theme, I've created a child theme. I now want to remove the sidebar widgets, as they are no use to me. I've read multiple articles online, but none of them work. I believe I ...
0
votes
0answers
58 views

Create a widget to display image and Title?

I want to Create a Widget with image top and Title at bottom.Please help me to display like image top and Title at bottom also add link to to the arrow image. i have Created a Widget area and ...
2
votes
0answers
116 views

Multisite Widget/Content

I'm using WordPress multisite and need to display content across all subsites in the sidebar. This is a network of 50+ sites so updating all 50+ sidebars with this content every few days is not ...
0
votes
1answer
50 views

widget that will do shortcodes that user inputs

I have this widget that im working on and it allows the user to input a shortcode and it will display it in the sidebar. But its not working right. I can input the short code but it has no output. ...
-1
votes
1answer
40 views

How to delete Jetpack Widgets from the Widgets page in admin panel [on hold]

NOTE: Please note that, it's not the Widget Visibility issue — I'm taking about front-end. To supply a project to my customer, I need to hide/delete the Jetpack Extra Sidebar widgets from the ...
0
votes
0answers
97 views

How to give a File Upload option in wordpress Widget backend?

I want to use a file upload Input option where User can upload a Excel file on backend and the widget will save the file in uploads directory and save the file link in the $instance variable of ...
0
votes
1answer
86 views

New checkbox in custom widget isn't saving data

I'm trying to develop my own widget. Mostly cause I want to understand Wordpress functionality (yes I'm completely new. First ever try to extend wordpress) I want to add a function to display post ...
0
votes
1answer
379 views

Right way to update widget on dynamic new input field

I have code to add an input field dynamicly in my theme. I have testd it, as a metabox and it works. But, not in a widget. First add and update, that codes work, but when I refresh page or try to ...
0
votes
1answer
89 views

the_widget() inside functions.php

I'm setting some options in the backend using functions.php and I'm doing: $w = the_widget('My_Custom_Widget'); but I don't get any output. However doing <?php the_widget('My_Custom_Widget'); ...
0
votes
1answer
98 views

Error with function in functions.php?

I am using the below function in my custom theme to load posts via AJAX. But for some reason it is breaking the WP ADMIN WIdget Drag and Drop and also showing the White Screen of Death when I uploaded ...
-1
votes
1answer
54 views

Widget that shows categories with posts numbers

Is there any solution to show categories with posts numbers like 'Archives' widget without changing the font size? UPD0: Sorry if my question is not clear. What I want? We have a pretty nice widget, ...
0
votes
1answer
45 views

Widgets not showing on sidebars

I have registered two sidebars in my theme using the function below, but none of the widgets shows up in the sidebars even though I can manage them in the dashboard: // register sidebars add_action( ...
0
votes
1answer
32 views

How to optimize performance without transient?

I've built a widget to output some fancy content from an API. I realize today I added a transient system so everytime the widget is updated transient is deleted and everything is alright. What I ...
0
votes
0answers
50 views

Widget editor not displaying in Dashboard

I'm not sure if this is because of the new 3.9 update, because I haven't had to mess with any widgets in a while, but my active widgets won't display in the editor anymore. I've uploaded a screen ...
0
votes
0answers
55 views

WPMU widget use sitewide

I'm using a widget on a site with the blogid 1. But I want to use the same widget with the content from blogid 1 in all of the other sites. Is there a way to reuse this widget? I tried the ...
0
votes
2answers
176 views

How to change the default class for the widget title?

I would like to change the default class of the widget title. Currently it is h2 and I would like it to be h3. I have seen there is the option of customizing css so that h2 looks like h3. #sidebar h2 ...
0
votes
2answers
139 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
1answer
81 views

wp_dropdown_pages in widget form

I have a small quirk somewhere in my widget form. Upon saving the widget instance, the form refreshes with the wrong selected 'page_id' from the wp_dropdown_pages input. If I refresh the widgets page, ...
1
vote
1answer
68 views

Hide all Dashboard Widgets (not remove)

Is there a to hide all dashboard widgets, not remove them? I want my widget to be the first widget but according to the docs there's no way to specify where your widget shows up since it's all "core", ...
0
votes
1answer
44 views

Wordpress widget title coding

I have a problem with wordpress widget titles, some widgets are not affected by theme custom encoding. Here is the codes; function ecce_widget_title($title){ if( empty( $title ) ) return ' '; else ...
0
votes
0answers
29 views

How can I add widgets to specific post

Some of my post are longer than others. On those post I want to display more widgets for social media and such to fill in space, as well as to gain more exposure. I know there are plugins but I ...
4
votes
2answers
272 views

Can I display the widget admin in the page admin?

I would like to show the 'Appearance -> Widgets' menu underneath the text field in 'Pages -> new/edit'. Is it possible to take one part of the admin and show it elsewhere? Reading some of the ...
0
votes
0answers
59 views

Special characters showing in fallback font

I have created a widget that displays some text using a custom font imported with CSS @font-face. The font have support for scandinavian characters åäö, but when I display these characters in my ...
0
votes
3answers
174 views

Pass widget variable to external function

I am working on a custom widget which displays posts from a selected taxonomy (category or tag). This widget contains a textbox which the user enters an ID of a taxonomy (category or tag) to exclude ...
1
vote
2answers
750 views

Can I remove a widget area without editing code?

I am dealing with a Wordpress setup which has 2 widget areas. One seems to be breaking the page, and I want to remove it. Here is the screenshot of my widget setup How can I remove the Main ...
1
vote
0answers
31 views

Widget on the right side of the page overlaps with the left side

I added the mailchimp widget to the right column of my blog. But for some reason, it overlaps with the main content of the blog. Here is a screenshot of what happens Would anyone know why this ...
0
votes
0answers
24 views

What's the policy for building a theme that doesn't support widgets/menus?

I'm developing a minimalistic theme, and my plan is not to include menus or widgets in it. The Theme Review page on wordpress.org states: Whether implementing required, recommended, or optional ...
1
vote
1answer
119 views

Extending WP_Widget throws error when Monster Widget used

I wanted to override the output for the core Recent Comments Widget. I extended WP_Widget_Recent_Comments made the changes needed and it displays exactly how I want. However, I have now tested the ...
5
votes
3answers
139 views

Prevent second widget activation

Is there a way to "remove the widget from available widgets" after you've activated it once on some area? The idea is to allow user to activate only one instance of it.
0
votes
1answer
28 views

Apply code for all else first block

I have this code for sidebar in Wordpress :- register_sidebar(array( 'name' => 'Main sidebar', 'description' => 'main sidebar.', 'before_widget' => '<div id="blocks" class="siderbar ...
0
votes
1answer
112 views

Widget checkbox array empty on update function

I have a widget that is not passing checkbox state to $new_instance, specifically $instance[ 'posts' ]; if I dump $new_instance in the update function it is empty? All the other instance variables are ...
1
vote
1answer
142 views

Widget options get

How to get widget options? I've tried like this, like seen in the other question "Using widget options outside of the widget": $w=get_option('widget_wp_mywidget'); $one=$w[2]["myval"]; ...
0
votes
1answer
48 views

Insert to wp_footer if widget is found in the sidebar

I trying to insert a code into wp_footer whether the widget is present or not in the sidebar. How to avoid the unnecessary code in the footer? Add the code only if widget is present the sidebar. ...
0
votes
2answers
61 views

is_active-sidebar loop

So I have 4 widgets which is in large-3 columns, when they're not active I place a placeholder as user guide so the user would know where to put what. I did manage to work out the is_active but it ...
2
votes
1answer
57 views

List sidebars on a page

I need to generate a list of sidebars on a given page. I know how to list all sidebars that have been registered, and all sidebars that have been registered that have active widgets, but I do not know ...
0
votes
1answer
57 views

Random sidebar/widget background

Does anyone have a clever idea to get a random/changing background for just the widget sidebar?