Do embed shortcode on wordpress ajax request
Do embed shortcode on wordpress ajax request
Do embed shortcode on wordpress ajax request
There are two workaround options I’ve found: Workaround 1: You can use an indiscriminate number of non-breaking spaces where you would like a line break. So to imitate this: [shortcode paraA1=’789′ paraB1=’987′ paraA2=’890′ paraB2=’098′ paraA3=’901′ paraB3=’109′ ] You can enter: [shortcode paraA1=’789′ paraB1=’987′ paraA2=’890′ paraB2=’098′ paraA3=’901′ paraB3=’109′ ] The WordPress text editor will wrap the … Read more
Actually it depends. If you’re adding the functionality through a custom plugin or any third party solution rather than theme then the shortcode is best, otherwise you can use a template. You also can use template file with plugin, but then the theme and the plugin will be tightly coupled. That’s kinda not preferred. But … Read more
If that’s what they says in their docs then I think the time you’d spend trying to get around it will be much more than simply doing the following: Create a page. Put the grid shortcode in (normally, in the page builder). Then save the page and visit it (as in go to the page … Read more
Shortcode with multiple paramaters
The quickest way to recude the image size will be to write some CSS. Find the CSS class(es)/id(s) of that icon, and in your theme’s style.css: .icon-class{ width:20px; } If the image doesn’t go smaller, then you’ll need to set it’s width or max-width to 100%’, and make it’sheightauto` whilst you’re at it. If the … Read more
So I spent like 5 hours trying to figure out why my proper-looking code wasn’t giving me the behavior I wanted. Thanks to the fine commentators I was able to get current posts to display without the event_date specified but wasn’t able to fetch posts by date. I started thinking outside of the box and … Read more
So, you can get the category name with get_queried_object()->name: if ( is_category() ) { echo do_shortcode( ‘[x_recent_posts type=”post” count=”2″ offset=”” category=”‘ . get_queried_object()->name . ‘” orientation=”vertical” no_sticky=”true” no_image=”false” fade=”false”]’ ); }
Use a separate function to enable shortcodes in the text widget because trying to do so within the shortcode function itself is too late. // Enable the use of shortcodes within the text widget. function wpse249090_widget_text_enable_shortcodes() { add_filter( ‘widget_text’, ‘do_shortcode’ ); } add_action( ‘init’, ‘wpse249090_widget_text_enable_shortcodes’ ); // Do TimeStamper Shortcode ( timestamper() ) function timestamper( … Read more
How to make shortcode enabled in JSON Feeds?