do_shortcode & render custom field won’t work

Are you sure that you are supposed to nest the shortcodes like this? If the following is going to work depends on how the plugin you use handles nested shortcodes. <?php echo do_shortcode(‘[xt_tabs_button] [xt_tab title=”Informatie”] (types_render_field(“informatie”, array(“output”=>”html”))); [/xt_tab] [xt_tab title=”Spelregels”] (types_render_field(“spelregels”, array(“output”=>”html”))); [/xt_tab] [/xt_tabs_button]’); ?> Do you have the docs for this plugin available? The … Read more

short code output too early

A shortcode has to return just a string, you should not print something like in wp_list_pages() or echo. From Shortcode API: The return value of a shortcode handler function is inserted into the post content output in place of the shortcode macro. Remember to use return and not echo – anything that is echoed will … Read more

Shortcode with multiple variables

If you were to enable debugging and test the code (not sure why you are reluctant to do that), you would see that there are problems with the code. Your array elements need to be separated by commas and PHP variables begin with $. What you have won’t work as is. That kind of pure … Read more

Custom taxonomy in short code

Not sure if is this, but you can add taxonomies in query: new WP_Query(array(‘posts_per_page’ => $num, ‘post_status’ => ‘publish’,’taxonomy’ => $taxonomy)); You can filter by term with $taxonomy => $term: $taxonomy = ‘seasons’; $term = ‘spring’ /* $terms = array(‘summer’,’winter’) an array */ new WP_Query(array(‘posts_per_page’ => $num, ‘post_status’ => ‘publish’,$taxonomy => $term)); More on WP_Query … Read more

short code output too early

A shortcode has to return just a string, you should not print something like in wp_list_pages() or echo. From Shortcode API: The return value of a shortcode handler function is inserted into the post content output in place of the shortcode macro. Remember to use return and not echo – anything that is echoed will … Read more