WordPress.org

Ready to get started?Download WordPress

Forums

Show full post, not just excerpt (9 posts)

  1. HorrorUK
    Member
    Posted 3 years ago #

    I'm trying to show the full post in a section of my site, but can't get it to work for some reason.

    If I have <?php the_excerpt(); ?> it works fine, but If I change that to <?php the_content(); ?> It doesn't show the post content.

    On the page below, the first two entries are using the_excerpt, but the final four are using the_content. I've searched around the web, and the_content should be doing the job, so I'm not sure what's wrong.

    http://ioaf.moonworks.co/meet-the-team

    Thanks

  2. can you paste the full code of that template into a http://pastebin.com/ and post the link to it here?

    and please say hello to Michael and Lynne from me -
    blessings, Michael

  3. HorrorUK
    Member
    Posted 3 years ago #

    Here is the link:
    http://pastebin.com/gKQyFcEz

    I'll pass your greetings on to Mike & Lynn. I'm mainly working with Penny, and Elsa over the next few days as I've recently been added as a tutor. I'm sure I'll meet up with everybody else shortly though.

    Thank you for your help on this, and past problems. I have your site bookmarked now, as it is the perfect site for Avalonian WordPress nuts.

  4. HorrorUK
    Member
    Posted 3 years ago #

    I should add, that it is lines 22-55 that deal with the centre column.

  5. can you double check that is the right template you are working on?

    simply put something very obvious into the html code.

    (during programing and testing, i personally find it a good idea, to have the template name as a html comment at the beginning of the template.)

    a:
    despite having the_excerpt() in the code, the 'directors' are showing the full content text (unless you have set the excerpt to show more than the default 55 words).

    b:
    in the pasted code, there is the_excerpt() as well for the 'advisors' and showing nothing.

  6. HorrorUK
    Member
    Posted 3 years ago #

    For some reason, I'd copied/pasted during mid-edit. This is the section I'm dealing with:
    http://pastebin.com/bQfdfWdB

    With the excerpt on the directors, I have placed the text into the excerpt box, bypassing the limit. This was more to see how things looked on the page.

  7. try without setup_postdata(); which you shouldn't have to use with a query; (the_post() would set the data, as far as i know)

    http://pastebin.com/aneBePtR

  8. HorrorUK
    Member
    Posted 3 years ago #

    Thank you, that sorted it out.

    Strange, because I had to add setup_postdata(); on another section that wasn't working. I'm still learning this whole theme design lark :)

    I've passed your message on to Penny, and she is meeting up with Michael & Lynne tomorrow.

  9. great, thanks ;-)

    you would use setup_postdata() in a foreach loop for get_posts(), for instance.

Topic Closed

This topic has been closed to new replies.

About this Topic