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

learn more… | top users | synonyms (1)

0
votes
2answers
90 views

How to determine which sidebar the widget has been added to, via widget admin?

In the script below, which resides in a custom widget, I'm trying to determine which sidebar area the widget has been added to because I want to alter the default text depending on which sidebar the ...
0
votes
3answers
385 views

Modify WordPress widgets Screen

I have been searching for some time on how to modify the Widgets Administration Screen, i'm attempting to add the sidebar id to the wrapper elements. Current output: (produced by wordpress) <div ...
0
votes
2answers
445 views

Best practice for including plugin output in a template without using shortcode?

I need your recommendation for the best practice here: A custom post type I have created needs a list of attachments at the end of the post content. I have created a series of functions that handle ...
0
votes
2answers
745 views

Making tags appear as an Unordered list <ul> instead of a 'cloud'

I'm developing a a site using the wp e-commerce plugin, and it handles tags in pretty much the same way it would if I were using it for a blog instead of a store. The issue is that I want to use the ...
0
votes
1answer
151 views

Shortcode displays always first. Once again

OK, I've had a problem with echoes in my last shortcodem, but everything works fine now. But I have another one: function myWidget_shortcode( $atts ) { extract( shortcode_atts( array( ...
0
votes
2answers
652 views

Categories widget show empty?

Is there a way I can display all categories in the categories widget that comes with wordpress. I do not want to have to edit the core files and I want to stay away from rewriting the widget, but if ...
0
votes
2answers
556 views

FTP Widget Location

I am trying to recover some code I had several months ago (I have backups of everything). It was part of a text widget in my WordPress sidebar. If I have the full backup, where can I find that code? ...
0
votes
1answer
688 views

Widget Update Code Not Working

From what I can tell the widget API is pretty straight forward and simple, yet for some reason my update code isn't taking effect properly. When I press [save] from the backend all fields are blanked, ...
0
votes
1answer
273 views

Conditional Display of Links in Widgets

I want the links widget in my sidebar to display links based on the page the user is on. For example, if the user is on the home page I want it to display link1, link2 and link3. But if the user goes ...
0
votes
1answer
44 views

Check which registered sidebar a widget is added to

I have 2 registered sidebars in my theme one for Products and one for Blog. What I am trying to do is if my "Category" widget is added to the Product Sidebar the taxonomy is automatically set to ...
0
votes
2answers
34 views

register_sidebar fails when using a include within functions.php

I have registered several sidebars via functions.php like this: // Register sidebars function register_widgets() { // Main sidebar register_sidebar( array( 'name' => __( 'Main Sidebar', ...
0
votes
1answer
123 views

Add Bootstrap Classes to Recent Posts Widget

I am building a site that is based on an existing theme, lawyers. I am tasked to make the recent posts widget look like the practice areas section, I would need to add some structural divs (bootstrap ...
0
votes
2answers
91 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
1answer
92 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 ...
0
votes
2answers
132 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
60 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 ...
0
votes
2answers
655 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
48 views

Add Shortcode tag in Widget/Sidebar

I want to add a shortcode tag in the sidebar/widget. I am able to get the required functionality if I add the code in the theme's function.php add_filter('widget_text', 'do_shortcode'); My problem ...
0
votes
1answer
29 views

How can I specify that an area of my theme contains widgets?

I am pretty new in WordPress theme development and I am developing a theme that use BootStra CSS framework I have to do that a specific area of my theme can contains some widget\module (I don't know ...
0
votes
2answers
33 views

How to use wordpress content class?

<div class="sidebar_area"> <h4>Sponsor</h4> <div class="sidebar_content"> <ul> <li><a href="#">This is new post</a></li> ...
0
votes
2answers
344 views

How to show 5 posts from specific category on related page?

I'm not familiar enough with wordpress to ask the question directly, so please bare with me as I explain what I'm looking for. I have four primary sections of my business (A, B, C & D, for ...
0
votes
1answer
224 views

How to change color of registered widget areas in admin?

Right now they are all gray. How to change the color? I mean, how to add a class or id to the registered widget area that are shown in the admin area? This is how you register the admin areas in my ...
0
votes
2answers
93 views

How to use the widget area to extend the page content?

I want to remove a widget area (lateral), and extend the page width getting this area. What is the better way to do it?
0
votes
2answers
199 views

How to use get_results() in widget front end?

I'm trying to get_results() in my widget's front end, this is my current code: public function widget( $args, $instance ) { echo $args['before_widget']; if($children = $wpdb->get_results( ...
0
votes
1answer
89 views

How to best include widget area just on homepage?

I have a front-page.php defining the homepage of my theme (a Genesis child theme). In it, I have some custom widget areas, like so: genesis_register_sidebar( array( 'id' => 'cta', ...
0
votes
1answer
155 views

How do i display the built-in gallery inside a widget?

I want to display a specific gallery (without a plugin = WordPress built-in gallery) inside a widget. I tried the shortcode [gallery ids="717"] but that doesn't work. Maybe a workaround could be ...
0
votes
1answer
116 views

Undefined Variable in my widget

I'm trying to get my head around writing custom widgets with options. I've been following a few tutorials and have been trying to understand as I go. I've got a widget that works perfectly in the ...
0
votes
1answer
80 views

Making a Multisite Dashboard Widget

I tried to use the code from this question: How to Check Disk Space used by Media Library But it's displaying this error in a Multisite: How can I display it on my network Dashboard instead root ...
0
votes
1answer
143 views

Update widget form after drag-and-drop “only specific plugin”

This solution, Update widget form after drag-and-drop, works correctly but I want to adapt this function to affect only a specific plugin and not every plugin. How could I do it?
0
votes
2answers
109 views

including image assets in widget

I've written my first simple WP widget-- it all works fine, but I'd like to dress it up a bit, and add an image / logo in the widget display code. How do I package the widget (which is just a single ...
0
votes
1answer
136 views

wordpress widget missing jquery

I have live score website and it is not wordpress based i build a widget for pure php websites but now i want to offer the widget to wordpress users problem is when i tried the widget i get three ...
0
votes
2answers
460 views

Remove “Content” and “Discussion” from Right Now Dashboard Widget

How do I hide "Content" and "Discussion" element in the "Right Now" dashboard widget? Here's a screenshot:
0
votes
1answer
536 views

How to create wordpress widget that is fixed position on the home page

I want to create a video plugin which is fixed on the home page when user scrolls. I know there is a wp_float plugin . But I want to try build new plugin
0
votes
2answers
1k views

Get all posts by post_author

I am creating a back-end dashboard where I need to show all the post assigned to current user by the wp admin. I assign user role to Author and while creating post (as a wp admin) just assign ...
0
votes
2answers
320 views

Contact information footer

I am new to Wordpress but forced to create a website as a Wordpress template for my current employee (I am a front end developer, mostly build new systems/apps etc from scratch). Creating the template ...
0
votes
1answer
73 views

New loop vs widget

So, I have a sidebar that I'm going to list all posts in, I could just use a widget. But is it proper to use a new loop instead of a widget, or preferential?
0
votes
1answer
392 views

wordpress widgets screen disappeared

Im having a weird problem. The screen where you manage widgets (drag and drop them from left to right) suddenly disappeared. How can I access it? It should be accessible via admin>themes>widgets but ...
0
votes
1answer
115 views

Saving widget options from class method

I have a widget class (derived from WP_Widget) that has a method (called via ajax) to update part of its options(the elements order) without the user to click "Save", to set the handler I do from the ...
0
votes
1answer
709 views

How to Remove ALL Widgets from Dashboard?

I'm looking for a complete blank Dashboard. No widgets at all and preferably one column. There are snippets to remove the default WordPress widgets, but haven't found nothing about the ones added ...
0
votes
1answer
82 views

Add individual <hx> tag to widget title in sidebar

In my sidebar every widget title is enclosed in <h2> tags. I use 4 widgets in my sidebar and I'd like to have the first 2 widget titles as <h2> and the other 2 as <h4>. I changed ...
0
votes
1answer
195 views

dynamic sidebar in front page

I am developing TwentyTen child theme and wish to display dynamic sidebar on front page, but something is not quite right. I modified loop-page.php: <div class="entry-content"> <?php ...
0
votes
2answers
381 views

Recent Comments from Specific Category Widget

I've been trying to create a sidebar widget to display recent comments from specific category. I'm having difficulties in determining how Wordpress knows from which categories the comments are. I ...
0
votes
1answer
218 views

Create Widget or Enable Shortcodes in Sidebar

I'm well aware that WordPress by default does not process shortcodes in the sidebar. My question is why. I'm building a very small plugin that exports some content when the shortcode is present. This ...
0
votes
1answer
388 views

How to Modify a Widgets UL and/or LI Classes

Im attempting to use twitter UL styles on a custom menu widget. For example, in BootStrap they have a Nav List Style for UL's <ul class="nav nav-list"> <li class="nav-header">List ...
0
votes
1answer
283 views

Getting Duplicate Posts on Home Page with Widget Added Between Posts

I'm trying to add a widget area in between posts on the home page. I got them to show right where I want them, after the first post. The problem is that the first two posts are duplicated. The same ...
0
votes
1answer
569 views

Add a specific css to a widget

I have a theme with a sidebar and 3 widgets. I want to change the color of one of those widgets. The problem is that all the widgets have the same code: <div class="box_outer"> <div ...
0
votes
2answers
2k views

WP_enqueue_script() loads them always in wp_footer()?

This is my example code placed in functions.php: function my_init_method() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core', false, array('jquery'), false, false); ...
0
votes
1answer
45 views

Link listings with image

So I'm really new to Wordpress and I'm trying to create a simple widget. I want the widget to list the logos of my site's affiliates (similar to the "check out our shows" section on ...
0
votes
1answer
622 views

Custom dashboard widget search box

I'd like to create a custom dashboard widget that contains the search box from the posts edit screen. I know how to create the dashboard widget and how to display it, but I don't know how can I place ...
0
votes
1answer
2k views

Placing widget to menu

is there any way to display widget in menu. Actually what i want is "site stat" in the menu. (black area) At the right. link