WordPress.org

Ready to get started?Download WordPress

Forums

Separate Excerpt and Content In Single.php (3 posts)

  1. adapting
    Member
    Posted 6 years ago #

    I want to be able to display content of posts minus the excerpt of posts so that I can separate the two. This is best illustrated at here

    The site wraps a post's excerpt in a separate div to the mian content ...

    <div id="top_article">
    
    excerpt goes here ...  
    
    </div>  
    
    <div id="rest_of_article">
    
    rest of article here ...
    
    </div>

    I am pretty sure this must be straightforward. I realize this can be done by putting divs into the write dialog, but that could get messy. So essentially I would prefer a way to place an excerpt in a specific section of a single.php file and then the content below without the excerpt. What specific code could I put in single.php that can achieve this?

    Thanks

    Alan.

  2. soyuz
    Member
    Posted 6 years ago #

    Hi,

    I also want to able to do that. So the content before the <!--more--> tag goes to the div on the left and the rest of article goes to the right div. so far no luck. as you said, it can be done by putting divs into the write dialog, but it's messy, especially the <p>.

    so if anybody can give a shed of light?

    thanks :)

  3. justinratwebtek
    Member
    Posted 6 years ago #

    Sounds like you need to install one of the many Plugins for excerpts and alter your template to use the excerpt function inside the first div and the article inside the other. At least, thats what I'd do.

Topic Closed

This topic has been closed to new replies.

About this Topic