PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- $args = array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => null );
- $attachments = get_posts( $args );
- 'numberposts' => 10, // тоже самое что posts_per_page
- 'offset' => 0,
- 'category' => $category_id,
- 'orderby' => 'post_date',
- 'order' => 'DESC',
- 'include' => '',
- 'exclude' => '',
- 'meta_key' => '',
- 'meta_value' => '',
- 'post_type' => 'post',
- 'post_mime_type' => '', // image, video, video/mp4
- 'post_parent' => '',
- 'post_status' => 'publish',
- 'guid' => ''
- ) );