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

learn more… | top users | synonyms (1)

0
votes
2answers
223 views

How to make widget title accept php?

I am trying to make widgets accept php, but without resorting to plugins. So far I have enabled php for the widget_text but cant make it work for widget_title. I am using the following code in ...
0
votes
2answers
523 views

Hide certain widgets from specific user roles in admin

I'm looking for a way to hide certain widgets from specific user types in the admin, Appearance > Widgets page? For instance, admins can see all widgets, but authors can only see a select few? I ...
0
votes
3answers
903 views

Insert a span inside widget title to give a different color to the second word

I'm trying to make my widget titles two-colored; the first word white and the second one yellow. I have no idea how I can insert a span before the second word of every widget title so that I can put a ...
0
votes
2answers
257 views

Transform php code into a widget?

how can I create a widget out of a php code? It's just a disqus code that I would like to place in the sidebar. I could just paste the code in the widget section (my tag), but then I would not be ...
0
votes
1answer
162 views

Problem since update 3.5 [duplicate]

Possible Duplicate: Stackoverflow type of badge plugin giving warnings in Wordpress 3.5 I have updated my wordpress website simpliblog.org 2 days ago. And now I can read that on top: ...
0
votes
1answer
262 views

Call plugin with php function

This plugin only works as widget. I need call this plugin with php function. How to modify this code ? <?php /* Plugin Name: AJAX Calendar Plugin URI: ...
0
votes
3answers
281 views

Grabbing how many posts by month for a dashboard widget

I am trying to develop a dashboard widget that counts posts or post types by month. I am really not sure how to go about doing this. I know how to create a dashboard widget and all that with post ...
0
votes
3answers
3k views

<?php echo get_template_directory_uri(); ?>/images/image.jpg not working in sidebar

Hoping someone can answer this! I'm using <img src="<?php echo get_template_directory_uri(); ?>/images/image.jpg"> for my header and it is working. But when I try to use it in a ...
0
votes
1answer
252 views

the_post_thumbnail call removing li in code

Need some help here. I've been working on a widget to display a list of featured posts (custom post type) and want to display the featured image for each post so I was using the_post_thumbnail call ...
0
votes
1answer
54 views

How to disable a widget when dependent plugin is inactive?

My widget has a lot of dependent plugins, and disabling one of the plugins results in erratic behavior throughout my entire WP installation. I've been trying to use the function ...
0
votes
2answers
62 views

displaying tags in a widget

I have a widget which displays the latest projects as thumbnails on my website. When I mouse over a thumbnail the project title appears; this is the code for title: <h2><?php echo ...
0
votes
1answer
485 views

Sidebar widget: Randomly select text from a given set

I have a sidebar text widget, which displays a nice quote that's related to the blog contents. I change the quote every now and then, And I'm looking for a way to create a set of quotes and display ...
0
votes
1answer
739 views

Register sidebar 'before' and 'after' html as div rather than li tags

I am making sidebars for my theme using the register sidebar function. The codex does it something like this if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Right ...
0
votes
1answer
137 views

Dynamic Sidebar and XHTML Validity?

My question is concerning dynamic sidebars and wrapping the dynamic sidebar code in the <ul> tag. When I have widgets/dynamic sidebar enabled do not add widgets to the sidebar, and do not wrap ...
0
votes
1answer
198 views

Remove the Inactive Widgets

I'm looking for a function, NOT A PLUGIN, that allow me to remove the Inactive Widgets... there was a topic before Script to remove all inactive widgets? with an answer, however it's not working for ...
0
votes
2answers
536 views

How to add the same widget twice?

I noticed that if you put the same widget in two different widget slots (primary and secondary for instance) only the first one will appear on the page. The second slot will be empty. How to solve ...
0
votes
2answers
89 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
353 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
371 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
684 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
136 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
459 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
584 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
263 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
2answers
28 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
32 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
27 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
1answer
36 views

How do I pass arguments to dashboard widget callback functions?

I'm struggling to use the $callback_args parameter of wp_add_dashboard_widget successfully. The following code keeps displaying string(0)"" when dumping $args: add_action( 'wp_dashboard_setup', ...
0
votes
2answers
144 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
148 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
708 views

Custom Sidebar only on single post

I am developing a child theme for the new twenty thirteen theme and I am trying to add a sidebar (widget area) next to my content. I only want it to display in single posts. What I did: edit ...
0
votes
2answers
76 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
76 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
80 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
99 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
64 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
71 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
101 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
73 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
104 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
407 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
395 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
781 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
245 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
65 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
263 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
104 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
3answers
3k views

Woocommerce Product Category Widget - hide categories that have no products in stock

I'm using WooCommerce on my Wordpress site, and have a widget in the sidebar showing all product categories. It's setup to hide empty categories, and that works well. However, it still shows ...
0
votes
1answer
516 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
80 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 ...