[Resolved] excerpt inside a Page before title

Home Forums Support excerpt inside a Page before title

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1236424
    Dimazzio

    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 ?

    Κατασκευη Ιστοσελίδων https://www.funkycss.com

    #1236448
    Dimazzio

    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 ?

    Κατασκευη Ιστοσελίδων https://www.funkycss.com

    #1236506
    Dimazzio

    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 ?

    Κατασκευη Ιστοσελίδων https://www.funkycss.com

    #1236650
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could do this:

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

    Let me know 🙂

    #1236927
    Dimazzio

    Yeap ! that did the trick , works like charm ! 😀

    Κατασκευη Ιστοσελίδων https://www.funkycss.com

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