Articles of widgets

Notice: Undefined index: filter in …wp-includes/default-widgets.php on line 382

I’m getting this message on a WP 3.2.1 install with PHP version 5.2.17 Notice: Undefined index: filter in /home/netstewp/public_html/wp-includes/default-widgets.php on line 382 Any idea why?

Context aware widgets. My work in progress

I’m working on a simple addition to the widget options to allow the user to set the “context” in which widgets show be shown. Here’s what I’ve got so far, with my questions in the comments… 1) Append the widget form to all widgets… add_filter(‘in_widget_form’, ‘wse_widget_context_form’); function wse_widget_context_form($widget){ //echo ‘the widget id is: ‘.$widget->id; //do […]

Displaying a widget only on long posts (over X characters)

I’m looking to display a standard wordpress widget only on posts that are over X amount of characters in length (or another method that can roughly calculate the height of of a post.) I am looking to include some additional advertising in the sidebar of my sites posts that are very long and thus have […]

Recent Posts widget without Title

I want to add “Recent Posts” widget in a sidebar without a title but every time I add it, it shows “Recent Posts” text as title. How do I have it without title? I don’t want to use any plugin for this. Thank You.

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.

Add before_content and after_content to register_sidebar

Is there any way to add two new functions, before_content and after_content to the register_sidebar function? These would work like before_title and after_title, except it would wrap everything that comes after the title. I’ve found this thread which has some useful information, but every mentioned approach has flaws. For example, inserting the required code in […]

Show widget when not using SSL

My wordpress site supports http and https. What I want to do is to add a widget when surfing over http that says something like “Surf this site secure” to show the visitor that I also have a secured version. I don’t want to force them to surf over SSL because I’m using a type […]

Why does WordPress stores widget options in a multidimensional array?

I have a widget with 6 different options. When I use get_option, it gives me a multidimensional array, with all my options inside the inner array, like so: $options = get_option(‘widget_widgetname’); var_dump($options); And the output for var_dump is: array(2) { [2]=> array(5) { [“string”]=> string(6) “Search” [“title”]=> string(12) “WDSearchForm” [“show_wrapper”]=> string(0) “” [“animate”]=> string(0) “” […]

How do I stop a widget from displaying on mobile site?

On my main site I have used the search widget in the sidebar. However, the mobile theme I am using (minileven) already has a search box built into its menu bar. This results in a second search box in the sidebar (which appears after the post content) due to the widget. How do I stop […]

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I’m not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded the JS and everything… I then replaced certain code that “sven” posted in his answer. The uploader works […]