Load custom post type with ID in a shortcode
Okay, I solved my issue – it was too easy. I replaced ‘p’ => $bannerid, with ‘p’ => $atts[‘bannerid’], Now I am happy 🙂
Okay, I solved my issue – it was too easy. I replaced ‘p’ => $bannerid, with ‘p’ => $atts[‘bannerid’], Now I am happy 🙂
Found the issue to be the types_render_field() function (I am using the Toolset plugin). Switched to using get_post_meta() instead and it works fine.
The “official” answer is that you need to use do_shortcode() to process the shortcode as you can’t just simply apply a shortcode within the code. Here’s your original code with the “official” do_shortcode() way: add_filter( ‘woocommerce_checkout_fields’, ‘set_checkout_field_input_value_default’ ); function set_checkout_field_input_value_default($fields) { $fields[‘billing’][‘billing_city’][‘default’] = do_shortcode( ‘[geoip_detect2 property=”city”]’ ); $fields[‘billing’][‘billing_state’][‘default’] = do_shortcode( ‘[geoip_detect2 property=”mostSpecificSubdivision”]’ ); return $fields; … Read more
Try putting the 2nd line (the first code line) just after the shortcode, as in [sourcecode language = python]a+b=c f = 1 + 3 c = 12 + 13 (not actually code, but you see what I did.) You put a blank line after the shortcode, which was interpreted as a Just guessing here; you … Read more
That’s not an HTML tag, it’s a shortcode. If your theme used the the_excerpt() function for displaying the ‘compact version’ of the post content then this wouldn’t appear. WordPress strips shortcodes out of post excerpts to prevent this happening. If your theme is using its own method for generating the excerpt then its developer needs … Read more
Offset with ajax load more posts duplicates
Try embedding your video like this: <video controls> <source src=”https://www.domain.com/wp-content/uploads/2018/07/5898ca6e5276e4cd97c0bd730a2ed82c11780595-480p__80044.mp4#t=18″ type=”video/mp4″ /> </video> Paste this in your editor but make sure on the top right it is set to “Text” not “Visual”. When you switch it back to “Visual” you will just see blank gray frame. Preview the post and you should see the video … Read more
As we can see on the Codex, all strings produced in a Shortcode must be returned instead of echoing them.
Content included from pagination
The firts code call a template register.php this file needs to be in the root of your theme, if not are defined a subdirectory for template parts like /parts /addons /includes /templates /loops , etc. The way to call this shortcode is [my_Bp_registration_form] if you change this to ‘register’ in the add shortcode line, then … Read more