Articles of widgets

widget should display post archive by year and on click also by month

I want to display the post archives like seen in this picture. Shown by year and on click it should open up the months. I am not sure how to approach this, would you customize the standard WordPress Archives Widget?

How to make a widget expand wider than the column width when editing its settings in the admin

The WordPress Text widget expands horizontally beyond the margin of the sidebar when added to a sidebar and opened in the admin and I am trying to apply that function to a widget. I see inline css is being dynamically injected when the widget tab is opened and inserts as div style=”z-index: 100; margin-left: -88px;” […]

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 practical. One solution I’ve found is to simply insert the content I want into sidebar.php in the theme editor, though […]

How can I reuse the WordPress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it possible to use the Search form that appears on the Post Edit interface when creating a […]

Removing custom widget area WordPress 4.4

I know it is a very simple thing but I just cannot figure it out. I always used to define widget areas and sidebar in source code, however this time I have used the UI option from Appearance > Widgets to create a widget area. Now I need to remove, however I cannot find how […]

Theme Customizer – Choose where widget area appears, to let users organise widgets

I am creating a theme, and I have a problem with Widgets and Widget Areas. I am using the Theme Customizer to let the user edit the content, colors, etc. I know how to create a widget area. I need to be able to add that widget area to a specific section in the theme […]

Including Custom Post Type posts in a page template contextually (or should I widget?)

Please see the attached mockup… Each element in the sidebar (e.g., Communications) will probably have to be a Page. I’m aiming for maximum flexibility. I am using Epik (a Genesis child theme). I am trying to avoid having the people who will be creating the content for this site needing to know HTML/CSS so I […]

Why won't my custom widget stay in the sidebar after a reload?

After I drag my custom widget into a widget area and reload the page it’s gone. Any ideas? <?php add_action(‘widgets_init’,’register_postTypeWidget’); function register_postTypeWidget(){ register_widget(‘postType_widget’); } class postType_widget extends WP_Widget { function postType_widget() { $widget_ops = array( ‘classname’ => ‘postType_widget’, ‘description’ => __(‘Display Posts by Post Type’) ); $control_ops = array( ‘width’ => 300, ‘height’ => 350, […]

More flexible sidebar and widget management

I’d like to have a plugin for a flexible sidebar/widget management. In fact, I want to give a user the possibility to choose which sidebar should be displayed per page/post. I know there are many sidebar plugins out there. Unfortunately, I haven’t found one which cover all my wishes. So I’d like to code this […]

the_widget() and widget's ID

Let’s assume I have a widget that displays only its name: <p> <?php echo $args[‘widget_id’] ?> </p> So when I drag & drop my widget to any sidebar it shows: <p> myWidget-number </p> The problem is I want to call this widget with a shortcode: (…) ob_start(); the_widget(MyWidget); return ob_get_clean(); } add_shortcode(‘myWidget_short’, ‘myWidget_shortcode’); And when […]