wp_insert_post order problem
I’m sorry, I speak a little English.
My code in my custom theme (functions.php) [only example]:
$posts = array(
'141th',
// ...
'3rd',
'2nd',
'1st'
);
foreach( $posts as $post ) {
wp_insert_post( array( 'post_title'=> $post ) );
}
My posts list:
1
4
3
2
5
...
141
I would like (in order):
1
2
3
4
5
...
141
Why? What is the problem and how to solving?
Thanks.
$299 Affordable Web Design WordPress
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.