Shortcode does not work, changes html order

the_post_thumbnail_url() will echo the URL. You should use functions that have get_the_… in the beginning of their names, since functions starting with the_… will generally echo the content. So, your sprintf should use get_the_post_thumbnail_url() like this: $html .= sprintf( ‘<div class=”grid-item”><a href=”https://wordpress.stackexchange.com/questions/278102/%s” title=””>%s</a></div>’, get_the_post_thumbnail_url( get_the_ID(), ‘full’ ), the_title_attribute( ‘echo=0’ ), //get_the_title() //the_post_thumbnail() ); However, in … Read more

Custom Shortcodes Giving error on development site

Initialize the variables first. See code below: function mbiz_tabbed_box( $atts, $content = null ) { extract( shortcode_atts( array( ‘tab1’ => ”, ‘tab2’ => ”, ‘tab3’ => ”, ‘tab4’ => ”, ‘tab5’ => ”, ), $atts ) ); $tab1_button = $tab2_button = $tab3_button = $tab4_button = $tab5_button = ”; if ($tab1) $tab1_button = ‘<li><a href=”#” title=”tab1″>’ … Read more

how to create a proper query for getting a list of users with taxonomy related meta key

Objective I want to list sp_provider (hospital,clinics,doctors) whose sub_category is suppose ‘neurology’ rephrasing the words: I want to list users with sp provider category(meta value) such as “hospital” and the user have a sub category(meta value) “neurology” sp_provider is a meta value in user profile (sp-provider maybe a post-type or something for user management screen … Read more

gutenberg widget outputting paragraph marks

Does anyone have any idea what is causing the extra paragraph marks before and after? The Shortcode block performs wpautop() on the content (in the block) before the shortcode is parsed (see source on GitHub), i.e. wpautop( ‘[show-test]’ ) in your case, which then returns <p>[show-test]</p> and then outputs <p><div>hi there.</div></p> after the shortcode is … Read more

Post the content of a specific “Custom Post Type” post within a post using a shortcode

I would suggest creating a new custom taxonomy for relations between a post and its “tracks” or grouping of track posts if you’d like that way you can easily create a shortcode that will query all the needed tracks at once using a shortcode instead of calling your shortcode over and over and to order … Read more

Create a shortcode in WordPress, again

// Declare your shortcode add_shortcode(“download”, “downloadFunction”); // Second Declare your shortcode function function downloadFunction($att, $content, $code){ // your function is passed 3 Arguments // $atts : this is an array of the shortcode’s attributes // $content : this is the content between the code. in your case the file url. // $code : this is … Read more

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