Not sure I understand what you are doing with your shortcode, but I think you need to run rewind_posts() to move the loop counter back to the beginning for the second “execution.”
Example here: https://codex.wordpress.org/Function_Reference/rewind_posts
further explanation here: https://stackoverflow.com/questions/23729847/wordpress-difference-between-rewind-posts-wp-reset-postdata-and-wp-reset-q
Related Posts:
- Split Content and Gallery
- How to return loop contents
- How do I get the attributes of a short code from a post?
- Return vs Echo Shortcode
- as a shortcode within the loop?
- Adding shortcode closing tag after a loop
- What are the disadvantages of using global variable?
- Displaying terms based on loop posts?
- Missing image in gallery shortcode in custom feed
- Shortcode with a foreach and arguments
- Custom Loop Using Shortcode in Custom Page Template
- Shortcode in posts called by ajax is not working
- Trying to get property of non-object in shortocde
- WordPress shortcode in content, output in sidebar?
- Query posts only with actual text content (not including shortcode or images)
- How to put a block of code between [shortcode][/shortcode] in do_shortcode()?
- How can I pass additional params to a shortcode while in a loop?
- Get a Post Loop based on Logged in User information into a Shortcode
- How to add pagination in Terms
- Split Content and Gallery
- Shortcode for pulling specific Post Title outside loop when ID is passed in
- Have multiple loops on a page appear after/between page content
- Using shortcode within shortcode with dynamic variable
- How wp maps urls into files
- Counting the posts of a custom WordPress loop (WP_Query)?
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- Pagination not working on home page
- save_post + insert_post = infinite loop
- Get ID of a page containing secondary loop in content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- Exclude category by slug for for each loop
- WordPress Loop Through Particular Pages
- Display date only once for a each set of posts relating to that date
- IF statement in a do_shortcode
- Load comments per post on click with AJAX
- The main Loop is not starting in a custom blog template page
- connect last post with first post
- Chopping up a large ajax request of around 200 posts [closed]
- Combining the_excerpt with the_content
- Custom loop with conditional statement to separate each terms
- Custom Post Type Loop within Shortcode
- Breaking the loop?
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- woocommerce stored variable
- Get search.php results in header.php?
- Recent posts on a static home page
- A smarter way to display multiple loops inside a page template
- trouble calling an import class from an action in a plugin before wp_cron executes
- How can I paginate this?
- Obtain page data and use regular loop
- How can I load posts starting from, and including, the current post?
- How to fix pagination for custom loops?
- ‘Auto Draft’ Post showing in wordpress loop
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Multiple get_posts() queries on one page
- Change date format
- How to stop the continuation of posts on the second loop from where the first ended
- In Custom page – next_posts_link Not working while previous_posts_link is working
- Escape current post from loop
- Why isn’t my multiple loops working?
- How do I display the latest posts from three different categories?
- facebook like, tweet and google+1 buttons inside the loop on home, archive and search pages and missing facebook like buttons
- Loop returns the current page’s permalink and guid instead of the post in the loop
- Why the first with flexslider appears as blank on my code?
- Rendering pages
- add_action in the loop hooks
- How can have a conditional template tag based on the main loop within a secondary loop with new WP_Query(), using get_template_part()
- Reset Loop get_posts();
- WP_Query is only looping home page, not pages
- How to filter posts by category INSIDE the loop
- Offset Loop by 1 , Limit next loop to 1 (Most Recent) Post
- How to show multiple attachements together with Scribu’s Posts 2 Posts connector?
- Custom Header added within Dashboard pages, is this possible with custom template files?
- Loop order issue with Ajax filter
- Adding a second loop breaks everything
- Need to while loop and display contents in the subfield of a group field given by ACF
- Custom Query with Sticky Posts
- How to display a loop of custom post types in columns
- is it bad to copy the loop for a template?
- I want to load post in bootstrap Modal dynamically
- WordPress Modal showing posts not working properly
- Query posts and display all dates in repeater field in chronological order
- Return only one post format in index.php [duplicate]
- Multiple loops in set intervals with code in between
- Modify widget to output posts in custom order
- How to execute custom loop before loop content?
- Limit article to 100 characters. Can’t use the_excerpt…
- Return only content in excerpt field in loop
- This webpage has a redirect loop issue with SSL page
- Buddypress Group Activity Loop Filter activity type [closed]
- get_posts and wp_autop (remove filter)
- Trouble preventing duplicate posts between 2 loops on homepage
- How to write a query-function as a query-shortcode?
- $do_not_duplicate is not working in genesis theme
- Loop displays current page
- Hook in the loop after the first post