• Resolved annashili

    (@annashili)


    How do I add an excerpt to the front page? I’ve tried doing it through a plugin, and I’ve tried doing it with code (changing the_post to the the_excerpt) but neither have worked?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @annashili,
    If you want to do it by changing function in template files – then you should replace the_content() with the_excerpt(). The files which need to be changed are located in template-parts directory with names started with content-home-

    I hope it helps you a bit ??

    Thread Starter annashili

    (@annashili)

    I tried doing this but it didn’t show up on the frontpage? Is there another way to do this? It should be said I am using a child theme, I don’t know if that would affect it?

    Thread Starter annashili

    (@annashili)

    I actually went and double checked, and couldn’t find any mention of the_content in any of the content-home- files.

    Theme Author Patryk Kachel

    (@limestreet)

    Hi @annashili,
    you’re right there is no the_content() function in those files, but to display excerpts you should add the_excerpt() function.
    You need to copy one of the content-home- files (depsnds on the home page layout settings) to your child theme directory and add <?php the_excerpt();?> in the line where you want to display excerpt (mostly line 26, but in list layout it’s line 28 and 44).

    If you have any more questions – please let me know ??

    Thread Starter annashili

    (@annashili)

    Oooh okay, makes sense! Will try that, thank you so much for answering. And while you’re here, was wondering whether the theme has something to do with the fact that author profile pictures aren’t showing? The button has also disappeared from the user profile settings & it doesn’t seem to be because of any plugin?

    Theme Author Patryk Kachel

    (@limestreet)

    Images in profiles should be loaded from gravatar.com
    You just need to have Gravatar account registered with the same email address as WordPress user. Then it should just work ??

    Thread Starter annashili

    (@annashili)

    I do, but it’s still not working nor showing up on the edit profile (it just shows the box on the author pages). This might not have anything to do with the theme though, but thank you for responding anyway!

    Hi @limestreet

    Could you please elaborate on those instructions in a more step-by-step way so a WordPress noob like me can work out how to add excerpts to the homepage of the Pencil theme without going to WordPress school?

    Much appreciated!

    Theme Author Patryk Kachel

    (@limestreet)

    Hi @tulikeidar1

    this is quite advanced topic… First you need to create child theme: https://developer.www.ads-software.com/themes/advanced-topics/child-themes/

    Then if you’ll understand how it works all will be much clearer. I hope so ??

    P.S. I have this option on my “to do” list… But still really busy and not able to implement ??

    Best,
    Patryk

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Excerpt on frontpage’ is closed to new replies.