WordPress.org

Support

Support » How-To and Troubleshooting » Separate Excerpt and Content In Single.php

Separate Excerpt and Content In Single.php

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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 🙂

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Separate Excerpt and Content In Single.php’ is closed to new replies.
Skip to toolbar