Articles of widgets

I've set up an extra field for all the available widgets. How do I show it's value in the front-end?

Thanks to another great post here I managed to set up an extra field (called “subtitle”) for all WP Widgets. Now I am trying to make all WP widgets display the value of this extra field (naturally, after_title, since it’s the subtitle), but I can’t quite figure this out. Here is the code I use […]

WordPress Widget Not Saving Instance

I have very simple wordpress widget, that has 3 input field. Whenever i submit data, it does not save to database. I have added and deleted the plugin , deactivated and reactivated multiple times, but no luck. Below is my code :- class price_package extends WP_Widget { function __construct() { parent::__construct( ‘price_package’, ‘Price Package’, array( […]

How to use title attributes in sidebar widget?

I have a custom post type “article” & I need to display some custom urls is a widget in the sidebar using php code widget. When I use this code withing the loop it works perfectly: <a href=”<?php echo site_url(‘/article/full-text/’); ?> <?php $slug = $post->post_name; echo $slug; ?>” title=”<?php the_title_attribute(); ?>”>Full Text</a> but when I […]

Is it possible to remove <ul><li> from default category widget?

I´m having some difficulty override to default category widgets in my wordpress theme. I created the theme from scratch. I want to remove the <ul><li></li></ul> from categories in the lists. I want to add my own style using <a href=””></a> instead <div class=”list-group”> <a href=”#” class=”list-group-item”>LifeStyle</a> <a href=”#” class=”list-group-item”>SmartPhones</a> <a href=”#” class=”list-group-item”>Business</a> <a href=”#” class=”list-group-item”>Graphic […]

A/B test options at the widget level

I am looking for a method to show 1 of 3 different widgets on my site’s homepage. I could do this with javascript, but this would increase page weight and I would rather do it at time of render (native wp or php solution). The solution does not have to be a true A/B test […]

Load widget only on blog posts

I am attempting to ensure a widget is only loaded on blog post pages. I tried using $post_type = get_post_type( $post_id ); inside the widget function of my widget class. However, upon loading pages like the homepage, ‘archives’, ‘categories’ etc. . . the post type is always ‘post’. The only exception is when I create […]

Why can't I see “Widgets” in my Apperance menu?

So I am trying to create a widget-area. And after adding some code to the functions.php I noticed that I can not see “Widgets” in my menu. So I figured I had to add “widget support” to my theme so I started to search for this, but it seems there is function to register support(?) […]

Widget page stopped loading

I’m currently having an issue with the widgets page in the backend. however I’m having a heck of a time identifying what’s break the page. I’ve found there are 3 widgets that when removed from the theme, the page loads correctly. The page stops loading before the widget description in the left column of the […]

Is there any tab widget plugin supporting third party widgets?

I am searching such a tab widget supporting third party widgets, such as YARPP, TOC+, Ultimate Tag Cloud. The following two popular tab widgets doesn’t meet my requirements. WP Tab Widget: only supports: Popular Tab, Recent Tab, Comments Tab, Tags Tab Tabs Shortcode and Widget: only supports: Text Tab (HTML is allowed)

How not to display an instance of a widget dynamically?

How to change the CSS style for an instance of a multi instance widget dynamically depending on the result of an SQL query? When the query returns nothing at all, I would like that the instance of the widget is not displayed. But if the query returns a result, I would that this result is […]