• I am trying to get my permalink structure to be the post number. For example:

    http://sitename.com/03 —This will be the third post which is published

    http://sitename.com/04 —This will be the fourth post which is published

    and so on…

    I am currently using the following to get the postcount:

    $loopday = ''; if ( have_posts() ) : $countposts = 0; while(have_posts()) : the_post(); $countposts++;

    Output in loop:

    printf("%03d", get_post_meta($post->ID,'incr_number',

    I just want that number in the permalinks, I have a feeling it isn’t possible, but I thought I would give it a shot.

    Thanks

Viewing 1 replies (of 1 total)
  • Post IDs will never be sequential. WP stores lots of things in the wp_posts table besides Posts. Those other things use up ID numbers.

Viewing 1 replies (of 1 total)

The topic ‘Use Consequetive Post Number as Permalink’ is closed to new replies.