EDIT
So if i understand correctly what you want is
$children = get_posts( array( 'parent'=> get_the_ID() )); // 'post_type' => 'all_products' in option
Have you tried removing “parent”=>0, meaning that a page has no parent like this
$children = get_pages( array( 'child_of' => $post->ID, 'post_type' => 'svi_proizvodi' ));
Related Posts:
- How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only
- Automatically create child pages when saving a (parent) page
- Taxonomy count per Post type
- Display a list of child posts on parent posts of a custom post type
- 404 on child page when parent page slug is identical to custom post type
- Count posts or custom post types from last 24 hours (or from today)
- Create child page within custom post type
- Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
- Count posts that have specific taxonomy term attached
- Count post that have specific meta value
- taxonomy list display custom post count
- Display posts of custom type in hierarchical order
- Count custom post types with a specific meta value
- Custom Post Type Category List & Post Count
- Taxonomy list. Order by a specific custom post type count
- Get count of custom post type created by current user
- Query in a Hierarchical Custom Post Type for Children vs Siblings
- Child page in custom post throws 404 page not found
- Custom post type hierarchical permalinks not behaving as expected for parent/child pages
- get_queried_object error How to show post count by month in the taxonomy page
- Remove custom post type slug not working for child pages
- Share parent path between Custom Post Types and Pages?
- Page as a child of a Custom Post Type
- How to count custom post types with conditional operators
- Count posts with specific term_meta
- count_many_users_posts except current logged in user?
- Can I make WordPress use a custom template for a child page
- Count all comments of a custom post type
- right_now_content_table_end function not working?
- WordPress count child posts of each parent custom post type and use in json array for google maps jquery plugin
- Query/list all terms and their custom post count
- How to make sure content doesn’t display if selection is empty
- Custom rewrite rule for hierarchical custom post type
- List children on child post
- child of post type (custom)
- Child post with numeric only slug keeps redirecting to parent
- Next and Previous Posts of Same Parent
- Post count by month of taxonmy term
- custom post type category count shortcode
- Display Child Pages of Custom Post Type Parent Page
- Versioned Custom Post Type (Not the same as revisions)
- Custom post Type, child of a Page?
- What code should I use to display children of a custom post?
- Removed custom post type slug but not working for child pages
- How to display author post count for multiple custom post types?
- List of child custom post types lists all custom post types
- Post loop count is not in order
- Redirect to first child on Custom Post Type (without template)
- I am trying to get cutom post cout by month of current taxonmy term
- Query to get child pages of current page and display it in action hook
- how to count the current posts terms
- Trying to add a class to post links
- How to count other posts not having specific taxonomy terms?
- WordPress Count posts within a custom post type
- Display custom post counts for author , not default posts
- If/Else child list for Custom Post Type single template within loop?
- Migrate Custom Post Type with Custom Fields data and parent child order
- display post count in archive page that have relation with another taxonomy term
- Display category filters for custom post type when category is shared by multiple post types
- How do I find the count of the current post?
- How do I find out which (page) template file my custom child post is looking for?
- get_queried_object not work in taxonomy page
- Get queried object for custom post type count
- How to use POST method using custom wordpress button?
- How to show custom post count in archive page
- Standard Page Child of CPT Not Found (404)
- Display a list of sub-pages of Custom Post Type Parent Page
- Modify the category post counting function
- Columns depending on posts count
- conditional based upon the count of current user’s published custom posts
- WordPress custom post type and page
- Child Theme problems
- Taxonomy count per Post type
- Custom post type child page 404
- Counting custom post type with wp_count_posts returns an empty object
- Custom Post Type Child Pages
- How can I give WordPress child custom post type the same title and slug as its parent?
- How to add a post counter to the list of custom taxonomy terms?
- how to show Author post type count
- Complex Custom Loop with Includes
- Showing User’s Post Counts by Custom Post Type in the Admin’s User List?
- Confusion with adding meta capabilities to a role after registering a Custom Post Type with corresponding ‘capability_type’ parameter
- Display content from custom meta boxes in revisions
- Custom Post Type pagination – normal solutions aren’t helping
- delete custom post based on custom field date
- Disable All In One SEO Pack for some custom post types [closed]
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Custom Post Type + 20k posts = blank/404 within Admin edit.php [duplicate]
- Create/Edit posts and auto-redirect back to listing page
- How to load a template without it being assigned to a page/post?
- Is it possible to list and create custom post types with Vimpress?
- how to check if custom post type column already exists?
- permalink /category/post-name with custom post type and taxonomy
- Show all Tags in each post
- saving dropdown menu data on custom post type
- Custom field with Types: get custom field’s value label (of type select)
- How to display singular_name of custom taxonomy?
- Taxonomy doesn’t follow slug permalink structure
- How to properly get the wp_postmeta.meta_value of a custom post type in specifics?
- Pagination for event query