Articles of widgets

Add thumbnail to recent posts widget using filters

I want to add thumbnail to WordPress default recent posts widget, and I want to do it using any available filter. Is there any filter know to this subject/topic

Methods for development wordpress themes

Analyzing the code from WordPress themes, both free and paid for, and realized that there is no standard for the development of themes. Some themes use CPT for all other widgets, other Visual Composer (and dirty code) and so on. I know WordPress, studying hard and already making my themes and I am honestly confused […]

WordPress custom widget undefined variable notice

I am developing a theme and I have created a custom widget for it. When I turn on debug mode I get the following notices, NOTICE: wp-content/themes/integral/inc/widgets/feature_widget.php:92 – Undefined variable: title wp_list_widgets, call_user_func_array, wp_widget_control, call_user_func_array, WP_Widget->form_callback, Integral_Feature_Widget->form NOTICE: wp-content/themes/integral/inc/widgets/feature_widget.php:97 – Undefined variable: text wp_list_widgets, call_user_func_array, wp_widget_control, call_user_func_array, WP_Widget->form_callback, Integral_Feature_Widget->form NOTICE: wp-content/themes/integral/inc/widgets/feature_widget.php:110 – Undefined variable: textarea […]

wrapper div for widgets not showing with all widgets

I have registered a Widget area with the following code: // Register Sidebars function custom_sidebars() { $args = array( ‘id’ => ‘footer_sidebar’, ‘class’ => ‘footer_sidebar’, ‘name’ => __( ‘Footer 3 foto ruimte’, ‘text_domain’ ), ‘description’ => __( ‘Widget ruimte voor 3 1 foto plaatje widgets’, ‘text_domain’ ), ‘before_widget’ => ‘<div class=”col-lg-4 col-md-4 col-sm-12 singleWidgetBlock”>’, ‘after_widget’ […]

Ampersand breaking Widget title

When adding an ampersand (&) to the Text Widget title, the title breaks at the ampersand position (frontend). So: ‘me, myself & I’ becomes: ‘me, myself ‘ The ampersand is being stored (correctly) as & in the DB. What really gets me is the fact that the title is already broken in the output method […]

How to append custom text to the output of 'categories widget'?

How do I customize the “categories widget” to append additional text on the sidebar display? from category 1 category 2 category 3 category 4 to category 1 folder category 2 folder category 3 folder category 4 folder Without actually modifying the category name in the database, I would like to add some actual customized text […]

How do I get an array of widgets?

Pretty often I use one widget area placed in the footer of my theme, what displays its widgets as columns. As a theme developer I try to offer as much flexibility as possible. So if the theme user wants a specific amount of columns in the footer, than 1, 2, 3 or 4.. columns. It […]

How to not display subcategories in Recent Posts widget area?

I’m relatively new to WordPress, and coding in general. I am trying to edit theme-specific recent posts widget to display only posts within a certain category. Currently, the theme will display recent posts with video thumbnails in a category, but it will also include recent posts within any subcategories of that category. I do not […]

How to create a widget like this?

I have a problem with WordPress widgets. I want to create a widget like in the images. I know how to create a widget but I don’t know query and show the results as in the image. Explain: We get 10 posts from a category, then show it as title 1 is the first post […]

Register_Sidebar overwriting itself and doesn't exist in global $wp_registered_sidebars;

I have Dynamic sidebars that are generated based on terms of a taxonomy that were created. CLASS EXCERPT: public function __construct() { add_action(‘widgets_init’, array($this, ‘checkForActiveSidebarAndMenu’)); } public function checkForActiveSidebarAndMenu() { //global $wp_registered_sidebars; //print_r($wp_registered_sidebars); $terms = get_terms(array(‘taxonomy’=>’minisite’,’hide_empty’=>false)); print_r($terms); foreach($terms as $term) { $this->registerSidebars($term->term_id); //$this->registerMenu($term->term_id); update_term_meta($term->term_id, ‘sidebar_active’, ‘1’); //update_term_meta($term->term_id, ‘menu_active’, ‘1’); } } public function registerSidebars($mini_site_id) { […]