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
- How to fix pagination for custom loops?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Getting only direct child pages in WordPress with get_pages
- Display featured products through custom loop in woocommerce on template page
- How to get Author ID outside the loop
- How can i display the content in plaintext
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- 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()?
- AJAX with loop filtering categories
- Remove the Homepage Query
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- Ways to have multiple front-page.php templates that can be swapped out?
- Should I use loop in the single.php file?
- A search for ‘0’ returns results
- Why do themes rely on “The Loop”?
- Display all posts from specific categories on a page
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Cleanest Way to Select Every Second Element in a Loop?
- Add Content to Page without shortcodes
- Insert image or ad script after 3 posts using the loop
- Get date of last update outside of loop
- Pagination not working on home page
- Child Pages Loop
- How to place comments_template(); outside the loop?
- Multiple Loops Homepage?
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- How to get the first image gallery of a product in woocommerce in a loop
- Get post by page name or slug
- save_post + insert_post = infinite loop
- Loop.php vs looping inside template file
- Get ID of a page containing secondary loop in content
- Custom Loop and Infinite Scroll
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- is_home, and is_front_page conditional problem