[Resolved] excerpt inside a Page before title

Home Forums Support excerpt inside a Page before title

  • This topic has 5 replies, 2 voices, and was last updated 1 year ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1236424
    FunkyCss

    Hi, so i have used the add_post_type_support( 'page', 'excerpt' ); inside the child theme so i can use excerpts in my site .

    What i need to do is to show them after the title and before the image in the Pages is this possible ?

    #1236448
    FunkyCss

    UPDATE **

    So i have used a hook <?php echo the_excerpt(); ?> and i can display it but there is a way after the Page title before the featured image ?

    #1236506
    FunkyCss

    Hi , i found the solution – > after-entry-header will do the job ,

    But if there is no excerpt how can i make it not to be displayed , as i see if there is no excerpt will show the first paragraph of the content . this is a problem , is any possible solution ?

    #1236650
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could do this:

    <?php
    if ( has_excerpt() ) {
        the_excerpt();
    }
    ?>

    Let me know πŸ™‚

    #1236927
    FunkyCss

    Yeap ! that did the trick , works like charm ! πŸ˜€

    #1237564
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.