• We are cleaning up old posts, rewriting if necessary, improving SEO etc. on a site that has 12 years of posts. It looks as if editing a post changes it’s order on the blog page so that the old posts are being listed as most recent. Is there an easy way to write code to tell WP to list the posts in their original order? I’m not a coder but have successfully added code to my functions file in the past. Found this basic code for ordering by titles – am wondering if there is a way to do original publication date.

    `function change_posts_order( $query ) {
    if ( $query-is_home() && $query-is_main_query() ) {
    $query-set( ‘orderby’, ‘title’ );
    $query-set( ‘order’, ‘ASC’ );
    }
    }
    add_action( ‘pre_get_posts’, ‘ change_posts_order ‘ );

    Yes, I’ve seen that there is a plugin. I already use so many I thought that this might be an easy fix.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • you can edit published date showing in post editor on right side

    May be this trick will work for you

    Thread Starter ria_amp

    (@ria_amp)

    It doesn’t. I tried that. Though I’ll wait to be sure that the caches clear before being sure.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Posts in order of original publication’ is closed to new replies.