It sounds like your widget references the global $loop for some reason. This could possibly be due to the internals of the Widget class or due to interference of other plugins, i guess.
As a first step, to be on the safe side, try using a different variable name. The global loop is referred to as $loop, by simply renaming yours to $myloop you can avoid any confusions between global and local.
Secondly, if the trouble persists, test your widget on a ‘page’ type page. Or any other ‘single’ page. Does it only show a single row now?
Related Posts:
- Custom Post Type Loop throws 500 error when used in widget
- How do you get the count of posts in an archive page?
- How to show Y number of custom posts after every X normal posts?
- Custom Post Type Pagination Not Working On Archive Page
- Archive page…limiting posts per page
- Adding custom post type to loop
- Include custom post types in categories widget
- Pagination go to first page if i’m on last post
- Grossly inefficient wordpress loops!
- Order custom posts by taxonomy?
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Taxonomy posts on Archive page
- How to show related posts by category or custom post type?
- exclude custom post type by meta key in wp_query
- Get the title of custom post type in another loop
- Posts navigation in custom post type single.php not working
- Display custom field of specific post where post title matches variable
- Remove duplicated values from a loop
- How to connect two custom post types with nested loops
- Pass the_post() as a parameter
- Normal pages as children of my Custom Post Type
- get_template_part and template file names
- Show one item per category of a custom post type
- Multiple Loops On Custom Post Type Template?
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Custom Tag Description unable to display just below and outside of the Loop
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Group CPT posts by custom taxonomy
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Display Custom Taxonomy Alphabetically
- Hide a widget inside a div on specific type of post
- Problem: wp_query outputs all images on site
- Custom Post Type within the Loop on Homepage (Page Template)
- The loop seems stuck to a single (now deleted) post
- Custom Theme With Custom Loops
- Custom Post Types strange pagination problem
- Display related custom taxonomy posts in sidebar
- Targeting custom post type
- Does WP have a global of $id?
- Conditional for a Single Post That Belongs to a Category?
- Bootstrap accordion looping through posts incorrectly
- Using wp_query to modify the loop in index.php for a CPT
- Custom WP_Query doesn’t display all posts
- Query & the_content() is showing in the header
- Listing custom post types on archive page with array
- looping though custom post types and only return results in a given taxonomy
- How to conditionally add Custom Post Type to Front Page
- Pagination not working on custom query on a page
- Search Filter CPT, Custom Loop
- How to add a lightbox to class mix?
- get custom post type value in header.php [closed]
- Get post content from another section in custom single page
- get_terms() parent, child and grandchild
- Query all post types but limit to parents
- pre_get_posts works in post type archive but not in single post
- Custom post class, generate unique id from 1 to x depending on amount of posts?
- Create a custom taxonomy template that loops through child categories in term order?
- Why is the output of a call to the_excerpt different when the call seems to be identical?
- Custom PT, Taxonomys and wordpress query
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Only looping through pages that have children or subpages
- How can i loop through custom post type according to custom meta field?
- Changing WordPress sort order for returned child pages
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- creating a foreign key like relationship with custom post types
- Page that lists publications by classifying them by taxonomy
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- Loop all post on single.php
- Exclude a specific post in a Custom Post Type
- Filtering posts based on three taxonomies
- Add extra elements to the_post in a custom post_type
- Accessing download link from the loop with WP Download Manager Pro
- Custom WordPress theme not displaying posts from category
- Custom Post Type has wrong label and is not found when called by a loop
- Error in the page of a CPT file in WordPress
- List all posts associated under custom taxonomy
- custom post type single page
- Custom taxonomy template for custom fields loop [closed]
- How to show terms used only for particular custom post type. Filter creation perpose
- 2 custom posts types, in their own columns, one pagination for both
- Custom post types not displaying per category
- How to show Y number of custom posts after every X normal posts?
- retrieve custom post image through widget
- Custom post type with custom taxonomy permalinks
- Pagination on custom post types
- How to get past and upcoming post by defining date in custom field?
- How to query all custom posts of a certain type and checking what category they have
- multiple custom post type category selection search
- Post data in separate divs with incrementing class using WP_Query
- Redirection loop error after login from a custom post type post
- Inserting random posts
- Custom Loop and Standard Blog Loop Issue
- Custom loop won’t work, can’t find problem
- empty dashboard for custom role
- Loop to pull content from parent element in custom post type [duplicate]
- How to exclude certain portfolios from a loop
- How to create custom page templates with default page layout framework?
- How to insert a post from a different post type after every nth post
- Complex Custom Loop with Includes
- How can I incldue a “private” post type in a loop for public users?