Ajax runs without a main WP_Query object and therefor all its APIs that are used to determine the type of page that is being displayed. The code which is responsible for outputting the result of the shortcode is probably checking for is_single()
to be true so it will not add output to archive pages.
What you can do is to create a main query object, but it will probably be just faster to look at the code that generates the shortcode and find out if there is a simple function you can calll to do what you need.
A note about your general strategy – you are going to overload your sever with uncachable requests. If you have the CPU to spare or it is just one page, then there is probably no problem with that, but otherwise be very careful with what you do.
Related Posts:
- 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
- Remove a short code and update it’s content (AJAX)
- 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
- Why are you using add_action for shortcode?
- How to get URL param to shortcode?
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- Native “playlist” shortcode random playing… How?
- How to display the names of users from a specific group with a shortcode?
- shortcode for logo image
- Stop strip_shortcodes() stripping content inside shortcodes
- How do i link gallery thumbnails to different url’s using the wp native gallery?
- How to display some selected user meta data on a specific page with a shortcode?
- Gallery shortcode menu order fix no longer working on WordPress 4.0
- How to save a shortcode in a Gutenberg custom block?
- Is shortcode_unautop() broken?
- Can a shortcode function this way
- Dynamically create shortcodes using add_shortcode and a callback
- Passing attributes to shortcode dynamically
- Stop parsing shortcodes
- Meta tags in shortcode
- Adding PHP/HTML code inside page from custom template
- shortcode javascript not working on custom template file inside theme folder
- shortcode get thumbnail size
- Shortcodes Keep Wrapping in
- Stop auto formatting in shortcodes
- Get URL Param Plugin and Inserting Result in Widget Code
- Problem with using custom shortcode with ACF WYSIWYG field
- Add shortcode support to custom field
- Preserve shortcode content formatting
- Populate shortcodes with table data and get next row
- Running shortcode with variable that is modified
- Reloading a Mediaelement audio player
- Shortcode is not processed when added to option field using wp_editor
- How to apply an ID to Shortcode Embedded iframe
- Adding Shortcode Values to wp_head
- Shortcodes: closing shortcode not being processed
- Retrieving post excerpt as a shortcode
- Insert PHP code via shortcode?
- What is the correct syntax to append a URL using a shortcode for an iframe?
- Shortcodes in RSS excerpts
- How to trace shortcode to its functionality
- If else with shortcodes
- Using shortcodes to communicate my page design
- enqueue script with get_shortcode_regex
- find shortcode inside content of post
- WordPress Short code for List style
- Adding a cover image to video shortcode
- Insert First Image into post (full-width)
- How can i strip shortcode from HTML title tag?
- Show content if user left comment / non-logged visitors?
- How to insert current user ID/entry ID into a shortcode?
- Need help with creating a simple shortcode
- Using a WP shortcode in Homepage
- i want to show a modal when user lands on home page very first time
- Gutenberg running code only available in front end within shortcode
- Insert HTML in content property and render it using shortcodes
- Redirect per shortcode if user is logged in
- Logout user if click on a custom page link
- Shortcode Attribute not defined
- Second attribute of shortcode is not changing why?
- Is Post-Author-Id shortocde
- Plugin Shortcode value in post
- Add catagory attribute to custom shortcode
- Woocommerce Filter Main Loop by Tag [closed]
- Class variables in shortcodes
- Separating Custom Template logic
- Defining the output of a WordPress Att
- Remove width and height attributes from [gallery] output
- Shortcode for sectors
- How to not show shortcode contents if cart is empty?
- woocommerce Product shortcode create [closed]
- Help with Shortcode Functionality
- Shortcode Site include in a other
- How do write this type shortcode? [closed]
- WordPress functions.php shortcode is not working [closed]
- My first WordPress shortcode just returning []