WordPress.org

Ready to get started?Download WordPress

Forums

Display excerpt of next and previous posts in sidebar (single post view) (5 posts)

  1. belledumonde
    Member
    Posted 7 years ago #

    I have a single column layout and in my 'bottombar' on single page view, I'd like to show the title, excerpt and maybe the comment count/other post meta data like this (the space on the right is for other sidebar stuff like subsribe options, list of most recent posts etc.):
    ==========================================
    | Current Post
    | Title
    | Content
    | Meta Data
    | Comments
    ==========================================
    | Previous Post
    | Title
    | Excerpt
    |--------------------------
    | Next Post
    | Title
    | Exerpt
    ==========================================

    Is this possible? If it's in the sidebar.php then it's outside the loop, is it possible to get the id of the current post and use it to get the info of the next and previous posts? Do i have to have part of the sidebar code in the single.php template to do this then include a sidebar-single.php without the beginning part of the sidebar?

    Ok, maybe I should stop suggesting stuff. I'll leave it to the experts to tell me what I should do. Any help would be really great. Thank you!

  2. belledumonde
    Member
    Posted 7 years ago #

    *bump*

    this question has been asked before here

    http://wordpress.org/support/topic/86844?replies=1

    but didn't get an answer. maybe someone could possibly answer it so if another person does a search they'd find a topic with a solution? thanks!

  3. JesseHeap
    Member
    Posted 7 years ago #

    I'm in the process of creating something like this for my wedding cake blog..

    Basically I created two functions that grab the excerpt for the next and previous post and displays them in the top navigation menu. See more details on my blog - http://projects.jesseheap.com/wordpress-navigation-enhancements-2006-12-14.htm

    In my particular case the excerpts are going to be images, but they could also be text based excerpts.

  4. belledumonde
    Member
    Posted 7 years ago #

    Oh thanks! I'm looking into it right now :)

  5. mores
    Member
    Posted 7 years ago #

    holy moly ... jesse, your cakes look soooo good !

    and thank you for the nav-enhancment link, i'm checking it out now!

Topic Closed

This topic has been closed to new replies.

About this Topic