WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Post Number? (2 posts)

  1. mhains
    Member
    Posted 7 years ago #

    I'd like to replace the "More" within the excerpt("More") with "Page 1304" -- y'know, kinda like a table of contents in a magazine.

    Anyone know how to generate the post ID# associated with a post?

    thanks,
    Michael

  2. Kafkaesqui

    Posted 7 years ago #

    To display the ID:

    <?php the_ID(); ?>

    http://codex.wordpress.org/Template_Tags/the_ID

    To pass the ID as an argument to a function/template tag, use:

    $id
    ~or~
    $post->ID

    Note: the_excerpt() does not make use of the 'more' quicktag.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags