Forums

Static page only showing excerpt.... (8 posts)

  1. ee0u30eb
    Member
    Posted 1 year ago #

    http://www.fitness2improve.co.uk/wp

    I have set the site to use a static front-page, but for some reason it will only show an excerpt. The full page does exists and I have tried setting a few different static front pages to see if that would work.

    The template being used is a carbon copy of the default page template for the site, but I saved a seperate template file just in case the issue lay somewhere there.

    Is there something I am missing? There is no 'more' tag set either.

    Thanks

  2. Roy
    Member
    Posted 1 year ago #

    Check if the page template doesn't use the_excerpt instead of the_content. That's the only thing I can think of as of now...

  3. ee0u30eb
    Member
    Posted 1 year ago #

    Thanks Roy, but I checked that. The template is the same as all the other pages which show fully, just not the front page.

    Either there is a setting in some config file that I dont know about which relates to the front page, or there is a bug.

  4. ee0u30eb
    Member
    Posted 1 year ago #

    AHA, sorry, my fault.

    fucntions.php:

    function my_excerpts($content = false) {
    // If is the home page, an archive, or search results
    if(is_front_page() || is_archive() || is_search()) :
    global $post;
    $content = $post->post_excerpt;

    I've got a feeling that that will do it!

  5. alchymyth
    The Sweeper
    Posted 1 year ago #

    looks like you have to exchange is_front_page() with is_home()

    http://codex.wordpress.org/Conditional_Tags

  6. angusjpaterson
    Member
    Posted 1 year ago #

    hey ee0u30eb,

    Did you get this working? I'm having the same trouble...

    I attempted to paste your code into the functions.php file but couldn't get it to work.

    Any pointers would be wonderful.

    Cheers

    Gus

  7. ee0u30eb
    Member
    Posted 1 year ago #

    Hi Gus,

    Yep got it working. The problem is this part:

    is_front_page()

    delete that so you will now have:

    function my_excerpts($content = false) {
    // If is the home page, an archive, or search results
    if(is_archive() || is_search()) :
    global $post;
    $content = $post->post_excerpt;

    followed by the rest of your function.php code

    Let me know how you get on.

    Tom

  8. angusjpaterson
    Member
    Posted 1 year ago #

    Hi Tom,

    Thanks so much for your hasty response!

    For some reason as soon as i posted this it started working properly and i can't quite understand why?!!

    It think it must have been something to do with a load of redundant pluggins i just deleted as one of them was a post excerpt length restrictor.

    In any case i'm sure your code above will be very handy if the problem crops up on another build.

    All the best and thanks again

    Gus

Topic Closed

This topic has been closed to new replies.

About this Topic