The problem is that the order of the home page is not correct anymore. The new items are not in the same order as the menu, even though this is active:
'orderby' => 'menu_order',
'order' => 'asc'
In the database I can see that every new page, type=project
, used to have a menu_order
assigned but not anymore? The menu_order
for every new page is 0
.
How is this possible?
ADDED:
thank you for your help. Projects is a custom post type. In a custom page template I have the following code:
array('projects'), 'orderby' => 'menu_order', 'order' => 'asc', 'post_status' => 'publish' )); if ( have_posts() ) while ( have_posts() ) : the_post(); ?> The template is created by someone else. It has been explained to me by the site owner/editor that he changed the menu ordering and then the page displayed the projects in the same order. But now (since the new theme) this does not work anymore. The only thing I can find in the code is what you see above. I added the page-attributes and now I can manually change the order. But this is still not what the client used to do..
menu_order
for any new Post is0
, so unless you either set the order manually for each Post, or have some code in play to hookwp_insert_post_data
, the results you describe should be expected.