The documentation for get_children
isn’t great (at the time of this answer), however get_children
is simply a wrapper for get_posts()
. This means that orderby
and order
are valid arguments for your query.
When you ask, “how i get them with the order as i needed“, is the property you wish to order them by a valid orderby
value? If so, your function call might look like this:
$post_images = get_children( array(
'post_parent' => $id,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'title'
'order' => 'ASC',
));
Related Posts:
- How to get Images included in Post
- Aligning images in the wp editor not working. How do i get this to work in custom theme?
- Integrate video and iframe in a post type gallery
- removing inline styles from wp-caption div
- Add custom Attachment Display Setting for images
- disable WP automatically inserted line breaks after an image
- Find the post an attachment is attached to
- Delete the original big size image after upload and leave only 3 images crunched by media gallery
- Post slugs and images cannot have same name?
- Add existing images from Media Library in to custom gallery
- Replace image attributes for lazyload plugin (data-src)
- How do I detach images from posts?
- How to know if get_posts() failed?
- Download external images if post is publish
- upload image in a meta box
- Can I load posts via Ajax?
- How do I use element instead of tags in WordPress post content having webP support?
- how to display full post with pagination on home page
- How to remove images from showing in a post with the_content()?
- Unattaching images from a post
- how to display post content without post image?
- How to wrap every image in a post with a div?
- upload featured image from front end using wordpress add media button
- Post & edit a post from front end along with upload, dropdown, and other inputs
- How do I change the gallery that is inserted in the post?
- How do I create Comma Separated list of attached image ids?
- Get post embedded image caption
- how to grab first link in post… and of course call it
- Posts Page Featured Image [closed]
- Load post content into div with ajax
- Displaying Page Title on index.php
- How to enqueue scripts depending on post formats?
- How to Replace the WordPress Featured Image with a Video?
- Add an image box besides featured image?
- Remove image from post also removes photo from media library
- Limit function to specific post category
- Post taxonomy from exif data
- Remove inline width from figure
- All my inserted images gets a link to the full image even if it is already full size image
- Convert a complex webpage into WP theme
- How to load a different header based on post format?
- Changing next and previous post link text
- get custom image size
- Remove permalink from images when inserting into post
- How to get only text from wordpress post content?
- Get all images out of the posts content
- how to replace embedded “full” sized images within a post with the “large” ones
- WordPress Theory Lesson – Image Columns within posts with alignment?
- Understand post type
- Batch process: remove first image from post content
- how can I put an image in a post with original size
- Mark menu item as current-menu-item for category
- Understanding and using metaboxes in posts
- Why won’t my taxonomy query show up?
- Show featured image next to post-teasers in Genesis Framework?
- Get image from post’s gallery
- Image Insert into posts and pages not working after 3.2.1 update
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Admin Notices don’t display on the admin screen for certain post
- Copying and pasting emoji in a wordpress post
- Comma separated all attached image ID numbers except featured image ID number
- Why orderby=”date” does not support manually changed posts?
- Static page does not show my posts
- Modify Image Source With The_Content Filter?
- I am unable to publish/update post
- page.php showing loop of posts and not page content
- How to display featured image without it appearing in post?
- Custom WordPress Theme: Publish Date and Display Date for posts right beside each other
- Can I use images as anchor tags with
- Featured Image uploaded, attached and set but only appearing in the media library
- Load post attached images on a single page site with fancybox
- How to show single post page as home page
- creating front end image uploader that uploads images as posts
- Errors when uploading images in WP 3.5
- Format the Layout of Images In The Edit Post Textarea?
- Exclude category from
- Blog page not working
- Set size for attachments
- How to display the link (title) and thumbnail post?
- Underscores Theme Unit Testing – Catching Untitled Posts
- get_the_excerpt() is not working as expected – returns wrong text
- I have a site where attachments in the wp_posts table have guid values of guid, how did this happen?
- CSS: How can I show a photo beyond the template’s column, but contained within the browser window? [closed]
- Get all attachment by post excluding featured and content inside
- How to use format post in a pertinent way
- wp-cli post create & media import issues
- Unable to restore from backup – how to obtain old blog posts?
- Get attachments for posts that belongs to a specific category
- List all categories with featured image from post?
- Get all images in post and comments like Twitter before post title
- Disable sticky option for specific categories
- Show only posts with images and a fixed amount of posts
- Issue where WP Featured Image will not display
- How would one change the default url structure of attachments?
- Highlight static blog page link in header
- Redirect to another page using contact form 7? [closed]
- How to create a template for Pages?
- If statement to check if post has image
- How do I do a page break?
- Gather posts into a cart/lightbox and share with another user