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
- Hide load more button if no more post in selected category
- Subpage for Custom Post Type
- How To Get Custom Post Type Category Title
- populate array with posts
- Displaying tags associated with posts in Custom Post Type
- Display custom posts randomly in custom taxonomy archive
- Using custom post type as taxonomy
- Transferring data to the end of a transaction with the Shopp Plugin
- Listing custom post types on archive page with array
- get_pagination not working on a custom post type query (using WP_Query)
- Show Posts to Author Only
- How to Make infinite loop of post
- Get custom post type categories to show up in menus
- WP_Query parameter conflict
- Create a comments template for custom post types
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- wysiwyg editor don´t export paragraph
- Add custom attributes to a post
- Custom Type add Transitions
- How to make a meta box?