Site logo

[Resolved] Paragraph below the post title

Home Forums Support [Resolved] Paragraph below the post title

Home Forums Support Paragraph below the post title

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #1447328
    Liran

    Hey,

    Is there any way I can get this layout using GeneratePress?

    Specifically, I’d like to have a paragraph below the post title (font should be a bit larger than a normal paragraph).

    Any help would be appreciated!

    #1447367
    Leo
    Staff
    Customer Support

    Hi there,

    Let’s try to tackle one question per topic so you can open a new topic for the second question.

    For the paragraph underneath the title question, are you using the custom excerpt metabox for posts?
    https://www.wpbeginner.com/plugins/how-to-customize-wordpress-excerpts-no-coding-required/

    If not we can probably make that work to show below the title.

    Let me know 🙂

    #1447387
    Liran

    Hey Leo,

    If not we can probably make that work to show below the title.

    Let me know how please!

    #1447395
    Leo
    Staff
    Customer Support

    Hmm on a second thought, using that method would mean that the blog/archives would also show the custom excerpt instead of the default excerpt word count.

    Are you ok with that?

    #1447398
    Liran

    Sure, I don’t see a problem.

    #1447413
    Leo
    Staff
    Customer Support

    Ok so just to make sure before we proceed.

    You are ok with having the excerpt in the blog/archive page to be the same as the paragraph underneath the title on single posts?

    We can make them different as well – just the methods are quite different so I want to make sure before we proceed.

    Let me know 🙂

    #1447414
    Liran

    I guess that would be okay. What happens if I don’t add a custom excerpt to some of the posts?

    #1447469
    Leo
    Staff
    Customer Support

    Then there won’t be any paragraph shown underneath the post title.

    Do you always want the paragraph underneath the title?

    Then we will go with another solution 🙂

    #1447523
    Liran

    I think it would be best if the paragraph only appears when there’s a custom excerpt (as some of my older posts don’t have it).

    #1447535
    Leo
    Staff
    Customer Support

    Ok let’s give the excerpt solution a shot first.

    – Create the excerpt shortcode using the PHP snippet here:
    https://docs.generatepress.com/article/page-hero-examples/#example-4

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    – Create a hook element and add the shortcode as the content:
    https://docs.generatepress.com/article/hooks-element-overview/

    – Select generate_after_entry_title hook with priority 2.

    – Check to execute shortcode.

    – Select Posts > All Posts in display rules.

    Let me know 🙂

    #1447892
    Liran

    That worked better than I expected. Thanks!

    #1447939
    Leo
    Staff
    Customer Support

    No problem 🙂

    #1477542
    Liran

    Hey,

    Sorry to bring this thread up again, but is there a way I can show the custom excerpt only inside the post?

    I know I said it’s not a problem, but I want to use the excerpt option in WP Show Posts, and it looks a bit awkward.

    #1478057
    David
    Staff
    Customer Support

    Hi there,

    this topic here explains how to add the Excerpt to the Single Post below the entry header:

    https://generatepress.com/forums/topic/how-can-i-add-featured-image-at-custom-location/#post-1404882

    #1479490
    Liran

    This will also be displayed in the Archive post excerpt.

    Is there a way around it?

Viewing 15 posts - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.