Is your $_Post returning the array as expected?
From what I’m seeing your add_action isn’t calling the right function either…
Either change wpprolister_ajax_layoutcontrol
in that line to ajax_layoutcontrol
or rename the function to wpprolister_ajax_layoutcontrol
Another option may be to put a selectbox meta on the page and use that to call the correct format though. then you don’t need to use POST data.
ie
function new_order() {
$template_check = get_post_meta( $post->ID, 'template_check', true );
get_template_part( 'content', $template_check );
}
Related Posts:
- Combining shortcode and get_template_part
- do_shortcode inside AJAX callback
- Custom Shortcode AJAX 400 Bad Request
- How can I run shortcode after click with ajax
- Ajax not returning anything on form submit
- How to use shortcodes on a widget sidebar when doing an ajax call?
- Shortcodes not working in an AJAX call
- How to get gallery id inserted to a post?
- Different uniqid when calld in wp_localize_script and shortcode
- How to add AJAX in a custom PHP function using Google sheets API
- AJAX and Shortcode with Parameters
- wp_editor in thickbox
- do_shortcode via ajax
- Pass data back to TinyMCE from Thickbox
- Getting error on submitting form using Ajax with shortcode
- Regenerating WordPress shortcodes based on value with AJAX
- Use Contact Form 7 with Ajax
- AJAX and do_shortcode
- Template not loading with get_template_part or locate_template
- Cannot modify class property from shortcode handler function
- Use Shortcode on Custom Page
- Do embed shortcode on wordpress ajax request
- Ajax callback and shortcode functionality
- Load next post by ID on a single page
- Access Shortcode in ajax code?
- load plugin with ajax [duplicate]
- Why is my ajax live search not working when i use a shortcode to call it?
- How to handle Ajax Calls, when using same shortcodes (with different parameters, e.g. ‘post-type’)?
- Working with Shortcode, AJAX, Elementor
- Using get_option() in JavaScript
- Shortcode empty attribute
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How to display the site name in a WordPress page, or post
- How can I put a wp_redirect into a shortcode?
- Using audio shortcode for .mp3 URLs with a query string
- Get multiple shortcode attribute values
- Why do_shortcode is not executing the shortcode in data-* html attributes?
- Is shortcode_unautop() broken?
- Some doubts about gallery shortcode in WordPress
- has_shortcode for content added after the content
- Creating a Slider Shortcode Based on Nivo Slider
- How can I make a shortcode from this code?
- Adding PHP/HTML code inside page from custom template
- WordPress auto adds p to shortcode parameters
- Why isn’t this youtube shortcode working?
- Gist shortcode is not working
- ShortCode and extra
- How to change page title (from a plugin) in twentytwentyone theme
- WordPress Code Standards and Working $link Parameters In Shortcode
- How to set Contact Form 7 fields default value using shortcode attribute? [closed]
- Shortcodes Keep Wrapping in
- Check if post has gallery images/media
- If you add a shortcode programmatically, but the code isn’t viewed on that request, is it still executed?
- How can I escape a section of my page which contains multiple shortcodes?
- Populate shortcodes with table data and get next row
- Running shortcode with variable that is modified
- shortcode to display post by category entered by user without plugin
- How to apply an ID to Shortcode Embedded iframe
- How to change the output of gallery shortcode
- wp_list_pages shortcode jumps above previous content
- Shortcode attributes don’t appear?
- Using $this from child class inside shortcode function
- Div-Wrap with Functions.php in Childtheme using Shortcode!
- How to trace shortcode to its functionality
- shortcode issue in the_excerpt
- If else with shortcodes
- Using shortcodes to communicate my page design
- How to check if a post has any one of many shortcodes?
- Is it possible to add a shortcode’s content to a table?
- How to set a variable in a shortcode and reference it in another shortcode in the same post?
- Can’t load search results with ajax
- Which file renders the “Edit Gallery” Settings page?
- using shortcodes in theme content
- How do you use do_shortcode via AJAX call?
- Plugin renders in preview but shortcode shows when published
- How to process shortcode on post save and update only
- How to turn this HTML code into a shortcode? (adding song lyrics and giving an id to a div)
- my form does not insert any data in the database
- Global $post returns 2 objects for my shortcode
- Gutenberg Shortcode Chooser Block
- Can Someone Help me to Correct my shortcode for displaying a category?
- Simulate shortcodes with javascript
- How to use Shortcode from one WordPress page in another WordPress page?
- WordPress 5.1 and Syntax highlighter, problem with HTML encoded special characters
- Convert WordPress shortcodes into plain html
- Get shortcode attribute for AJAX call
- Attributes are not passed on nested shortcode
- How to make a shortcode with a line break in it parse correctly?
- Plugin Shortcode value in post
- Woocommerce Filter Main Loop by Tag [closed]
- Shortcodes: override a shortcode / change shortcode on the fly
- Access the resized images generated by `add_image_size()`
- Separating Custom Template logic
- How return normal search result using wp_ajax action for wordpress
- woocommerce Product shortcode create [closed]
- A number appears inside a div called wpb_wrapper, when I use a custom shortcode
- Enclose article’s body with default shortcode
- Shortcode with foreach
- My first WordPress shortcode just returning []
- WordPress shortcode select option not working [closed]