Shortcode not being executed

Welcome. By using die function, You are stopping the process and it will stop immediately after running the shortcode callback. Better to let the rest of the code to be executed. You need to return something in shortcode callback function instead of sending headers using die or echo. So, change your code to something like … Read more

Shortcode select another dbbase

Your code looks correct to me, so I suspect there is some kind of issue connecting to the second database. Try the following which will log the last error: $wpdb->show_errors(); if($wpdb->last_error !== ”) : $wpdb->print_error() endif; If you are using multisite, then you will also need to add: define( ‘DIEONDBERROR’, true ); Have a look … Read more

Shortcode custom query not passing value

You haven’t defined $atts, so your function isn’t receiving any of the attributes passed by the user. This isn’t sufficient: $atts = shortcode_atts($defaults, $atts); That just combines $atts and $defaults into $atts, but the original $atts hasn’t been defined. You need to accept $atts as the first argument passed to your function: function clients_shortcode( $atts … Read more

Remove figcation from excerpt

Use directly in the templates. echo strip_shortcodes( get_the_excerpt() ); how does it work as follows ? add_filter(‘the_excerpt’, ‘strip_shortcodes’); or add_filter(‘get_the_excerpt’, ‘strip_shortcodes’);

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