Get title of page containing post grid within the posts
Get title of page containing post grid within the posts
Get title of page containing post grid within the posts
Hide download option video shortcode
JavaScript missing from shortcode content
Get a value from a shortcode for another function
How to utilise multiple values from a single shortcode attribute?
apparently I found the solution (thanks to amatorpl), if anyone needs it: function show_history() { $user = wp_get_current_user(); $user_email = $user->user_email; $show_history = ‘[shortcode_name search=”‘.$user_email.'” show=”url, color, size”]’; $history = do_shortcode($show_history); return $history; } add_shortcode(‘show_history’, ‘show_history’); Thanks for the try
After tinkering obsessively, I have solved the problem. As stated above, this is the failing shortcode entered in the post [product product_sell_price=$765 product_description=20”x16” oil on stretched linen. Varnished for protection and ease of cleaning. Includes the frame as shown and is ready to hang.] This is the shortcode that works perfectly: [product product_sell_price=$765 product_description=’20”x16” oil … Read more
The most basic option I can think of is this add_shortcode(‘bt_featured_image_acf_location’, ‘bt_featured_image_acf_location’); function bt_featured_image_acf_location ($atts) { return get_field(‘location’, get_post_thumbnail_id()); } Change ‘location’ to your acf field name and thats it. get_post_thumbnail_id() will get the current post featured image id. Once you have the ID of the post (images are posts, they are of the post … Read more
As the docs for add_shortcode() state, Every shortcode callback is passed three parameters by default, including an array of attributes ($atts), the shortcode content or null if not set ($content), and finally the shortcode tag itself ($shortcode_tag), in that order. Use the shortcode_atts() to define what attributes are allowed and set default values for those … Read more
shortcode containing other shortcodes not returning content