How to activate or install the Gallery Widget?

All of those plugins are only included for wordpress.com hosted websites specifically, and not included by default in a normal WordPress installation. Some of those plugins are available to download through the plugins section of you WordPress install, but I’m not sure if all of them are. For the gallery, try searching here: https://wordpress.org/plugins/tags/widget-gallery there … Read more

How can hide widget title if custom widget is empty

I always move my filters inside my query, this will inhibit them from showing anything when my query returns no results. You just need to move the following echo $args[ ‘before_widget’ ]; if ( !empty( $title ) ) echo $args[‘before_title’] . $title . $args[‘after_title’]; to just after this line if ( $related_posts ) { ?> … Read more

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

There are 2 problems here ( and a third unrelated problem ) Problem 1 You’re calling register_widgetArea, a function that doesn’t exist. Instead, you want to register a sidebar. If no sidebars are registered, the widgets menu does not appear in the admin area. Instead, use register_sidebar to register your sidebar. I would expect calling … Read more

Check if the current shortcode is being used in a widget

There are two hooks, widget_text and dynamic_sidebar_params. You can use one of them. add_filter( ‘widget_text’, ‘wpse219770_filter_widget_text’, 1, 3 ); function wpse219770_filter_widget_text( $widget_text, $instance, $widget ) { $tag = ‘bartag’;//shortcode tag if ( ‘text-2’ == $widget->id && has_shortcode( $instance[‘text’], $tag ) ) remove_shortcode( $tag ); else add_shortcode( $tag, ‘bartag_func’ ); return $widget_text; } Or you can … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)