• katarina8890

    (@katarina8890)


    Hi! Awesome theme, thank you!
    In the Features and Services section I would like to have the option to add a custom excerpt. Well, I’ve already added the option to add custom excerpts to pages (in funtions I added add_post_type_support( ‘page’, ‘excerpt’ );) but now I can’t figure out how to display the custom excerpt on the front page. It automatically displays the excerpt from the first paragraph of the content.

    Thank you for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author CrestaProject

    (@crestaproject)

    Hi @katarina8890
    in the “features” and “services” sections there is an option that allows you to choose the number of words to show (example: 30 words).
    You can find it within the section options.
    This option applies to all services and features shown in the onepage.
    If you need each feature (or service) to have its own number of words, you must create a child theme and manually edit the number of words for each block.

    Best Regards,
    CrestaProject

    Thread Starter katarina8890

    (@katarina8890)

    Hi! Thank you for your reply. I know I can set the number of words for the excerpts, but I want the sections Services and Features to display Custom excerpts. Now they just take the first paragraph from the page content. So I was wondering how to make them take the custom excerpt which I add to every individual page.
    So it’s now about the length of the excerpt, I want to display custom excerpts.
    Thank you for taking the time to reply.

    Best,
    Katarina

    Theme Author CrestaProject

    (@crestaproject)

    @katarina8890
    Perhaps some theme options conflict with the function you entered in functions.php
    Try this:
    Edit the file ../freddo/sections/section-services.php
    At line 24 you will find this:

    
    <p><?php echo wp_trim_words($content , intval($textLenght), esc_html($customMore) ); ?></p>
    

    Replace with:

    
    <p><?php echo $content ?></p>
    

    In this way the function you entered in functions.php should work
    Try and see if it works
    Best,
    CrestaProject

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom excerpt’ is closed to new replies.