WordPress.org

Ready to get started?Download WordPress

Forums

Number posts instead of date? (6 posts)

  1. wordmunger
    Member
    Posted 9 years ago #

    I'm working on a project to present a book in blog form. I'm thinking I can use wordpress to do it, but I need to solve two problems. First, I want the posts to go in chronological order (not standard reverse-chron). I think I've found out how to do that.

    Now I'd like the posts to be numbered instead of dated (chapter 1, chapter 2, chapter 3, etc.). Any ideas on how to do that?

  2. Lorelle
    Member
    Posted 9 years ago #

    Automatically numbered? I don't know if there is a way to do that, maybe someone has done a plugin, but you can manually add "Chapter 1 - Title of Chapter" to your titles so they would show up as Chapter 1 and so on. That's what I've done.

    I searched a little around and I can't come up with a chapter style plugin.

    And if you have figured out how to change the chronological order of the posts - you better share or we'll come to where you live and beat you about the head and shoulders with a wet chicken!

  3. wordmunger
    Member
    Posted 9 years ago #

    Well, this thread claims to have a solution. However, I haven't actually tried it yet, so I can't confirm it works.

  4. Kafkaesqui

    Posted 9 years ago #

    Lorelle, changing the sort order of posts is easier than pie with WordPress; just add this to end of the URL:

    ?order=ASC (or if a query already exists, &order=ASC)

    As for post numbering...Lorelle's suggestion is certainly easiest. WordPress assigns an ID number to each post but these are not reliable for use as post numbers since you can publish out of order, and deleting a post removes that ID from the records. There are ways to capture the number of actual post records, but tying row number to post would involve a bit of coding...

    So how about if someone wrote a plugin?

    http://guff.szub.net/wp-content/post-num.zip

    Grab the zip, extract post-num.php from it, upload that file to your plugins directory, and activate Post Num under Plugins. To use, place:

    <?php post_num(); ?>

    in your template where you want to display the post number.

  5. davidchait
    Member
    Posted 9 years ago #

    Actually, I'm with Lorelle. Don't use the physical post ID, just embed the chapter number in the title. That way, you could have other "writer's notes" posts between chapters or other commentary, without necessarily disturbing the book form.

    The book chapters should all be under a single category (ummm, "Chapters"? ;) ), so that if you wanted to ensure ONLY display of chapters, you could do that.

    -d

  6. wordmunger
    Member
    Posted 9 years ago #

    I'm not going to be adding any inter-chapter commentary, all that will be done using comments (or my own, regular blog). However, I do have a question about the Post ID. Is there a way to edit this number? If not, then I'm thinking if I screw up one entry, my chapter numbers will be forever messed up-- and then just using the title for the chapter numbers would be the best solution.

    I guess I was thinking that if the posts were given a number, then some of wordpress's automated navigation features would also work. However, the more I think about it, the more I think that's probably not going to work anyway. How would the "calendar" function work, for example?

    As davidchait suggests, categories might be a better way of managing the text.

Topic Closed

This topic has been closed to new replies.

About this Topic