The problem seems to be in the Loop. Inside the Loop you are not incrementing the $the_query
. You may change the code for the Loop as below:
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post(); // Add this line to fix the issue
smr_product_the_frontend_item();
}
} else {
// no posts found
}
Related Posts:
- Split Content and Gallery
- Do I need to use The Loop on pages?
- How to return loop contents
- How do I get the attributes of a short code from a post?
- Is including the loop necessary for page.php? [duplicate]
- When and Why is is_singular(‘my_cpt’) true while in_the_loop() is false?
- Return vs Echo Shortcode
- as a shortcode within the loop?
- loop not showing up when using a custom page template
- Custom page template
- Getting page ID inside loop
- Adding shortcode closing tag after a loop
- Get Pagination (WP-PageNavi) not to work
- What are the disadvantages of using global variable?
- Loop and Page template : my WP_query don’t take args
- Create a loop that gets pages with their template
- Running a loop with a custom query string on a custom page template
- How to load all pages into one page with their templates
- Displaying terms based on loop posts?
- Missing image in gallery shortcode in custom feed
- Shortcode with a foreach and arguments
- Output loop leveraged shortcode twice on one page
- Do I need to use The Loop on pages?
- Shortcode in posts called by ajax is not working
- Page-loop is looping content from custom loops on the same site. How to avoid that?
- Multiple get_posts() queries on one page
- 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()?
- Print the whole page?
- excerpt not showing up
- Custom Header added within Dashboard pages, is this possible with custom template files?
- 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
- Duplicated tag in loop
- get the value for ALT is we check to see if an actual ALT value is set, if not we use the caption and if no caption is set we use the title
- My WordPress installation doesn’t load correct template
- 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
- get_template_part() to render single page Theme
- Using shortcode within shortcode with dynamic variable
- How can I put a custom field as the link of a button shortcode?
- Display articles related to a custom field on a page
- Stuck with conflicting loops on page template
- Same Loop on Multiple Pages
- Loop not showing up on page template
- How wp maps urls into files
- Custom Page Template and Category Exclusion
- Display all posts in a page code for template
- Retrieve each widget separately from a sidebar
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- Adding ‘current_post_item’ class to current post in the loop
- Where should I use post_class()?
- Landing Page – Redirect Loop?
- Sort Popular Posts by Views for the Last Week
- Is it possible to display previous post revision?
- Easiest way to show total number of subpages
- Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !
- Fix inefficient loop breaks post.php on form submit
- How to retrieve current page WP_Query arguments?
- Custom Shortcode, functions PHP WP_Query loop
- Filtering The Loop For Single Page and Blog Page
- the_content() seems to block my ACF-code
- Removing the_content() from the page
- shortcode javascript not working on custom template file inside theme folder
- Filter the loop by categories using checkbox form
- Duplicated posts on category page
- WordPress loop: exclude if it is the latest post
- Apply an Incremental Counter in an Array Function
- Pagination not working in category listing [duplicate]
- Category links including all posts
- Custom loop ordering not working
- First archive page with a few posts
- Loop through ACF taxonomies and output associated posts
- Posts are not looping through correctly
- How can this multiple loop have pagination as described?
- Default featured image set as background image [closed]
- Breaking up the results of a loop
- Loop and add Specific Categories and Products Images
- How do i create a list-posts-page?
- Is file_exists() compatible with timthumb.php? [closed]
- Trying to get all links in my posts
- Creating a User-Adjustable chart in WordPress
- Archive: Lists itself
- Reorder posts in a loop: have the posts by one particular author below the others
- how to get author comment inside the loop?
- How to create loop in custom page, and get id from url into this loop?
- How to fix pagination for custom loops?
- Check to see if a field is within an array in twig
- Display single post inside accordion based on form submission results
- One page loop issue with posts
- Humanmade | Custom meta box class: How to display a repeatable meta box group?
- Building theme so user can change header image [closed]
- get_page() unlike Loop returns the post content without html tags. How can I fix this?
- Creating mixture of shortcodes to use in the visual/text editor
- How to set and retrieve cookies while in the loop