Display sidebar only if it has content

You can use is_active_sidebar to check if sidebar has any widgets or not. Display sidebar only if is_active_sidebar returns true. <?php if ( is_active_sidebar( ‘sidebar-name’ ) ) : ?> <?php dynamic_sidebar( ‘sidebar-name’ ); ?> <?php endif; ?>

Display assigned terms with link

Keep in mind that the return value of get_the_terms() can be of the type of array|WP_Error Your snippet should check if you get the correct type returned $terms = get_the_terms( 0, ‘product_tag’ ); if ( ! is_wp_error( $terms ) AND is_array( $terms ) AND ! empty( $terms ) ) { foreach( $terms as $term ) … Read more

Showing a Thickbox (tb_show) does nothing

Answer can be found here: https://stackoverflow.com/questions/13863087/wordpress-custom-widget-image-upload Even though the problem described isn’t exactly the same as I had, the code posted in the answer still helped me as that code actually does exactly what I needed. I also think that I didn’t originally find this answer as it’s on the regular Stack Overflow and not … Read more

WordPress Plugins won’t save

The most likely problem is that the theme is outdated and no longer compatible with some core WP functions, the theme was released in 2012 so it’s pretty old.

Display the id list of active widgets of same sidebar?

Despite what you say is_active_widget does work on custom widgets as well. You may just have trouble locating its ID. To help you, here’s a snippet that will show the ID of a widget on the widget admin. add_action(‘in_widget_form’, ‘wpse202950_get_widget_id’); function wpse202950_get_widget_id($widget_instance) { if ($widget_instance->number==”__i__”){ echo ‘<p class=”widget-id-message”>’ . __(‘Save the widget to get its … Read more

How to change plugin`s template (view) correctly?

Here is a little code snippet to get you started. This will query through the most recent custom post types named “custom_post_type”. Change this value to the name of the custom post you wish to query. <?php $args = array( ‘post_type’ => ‘custom_post_type’, // <– make sure to use the name of your custom post … Read more