Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1768711
Excluding headers from excerpt
Closed

Comments

  • Matt Richards started the conversation

    Hi, is there a way to exclude headers (h2 tags) from the auto-generated excerpt without having to manually do this for each post?

    It looks like the theme strips the HTML codes (which is fine), but currently leaves the texts which means that the header and content get merged in the excerpt.

    As all of my posts will have h2 tags, is there a box I can tick or a line of code I can add that will prevent any text between h tags from being included in these excerpts?

    Thanks!

  •  2,699
    PenciDesign replied

    Hi,

    That's the title of your post - It's not on your excerpt: http://prntscr.com/lddbwy

    Google boot will read your site and understand that's posts title of your posts

    Your posts content doesn't affect anything with this.


    Best Regards,

    PenciDesign

  • Matt Richards replied

    Thanks for the response, however I'm referring to the line within the post that reads "Where do I want to start? Backpacking Africa". In the full post, this shows as a heading using the h2 tag. However, in the summary shown on the screenshot, it gets combined with the text and appears to read "Backpacking Africa I've been thinking", which doesn't read correctly and looks like bad writing.

    It's that h2 tag I'm hoping to be able to exclude from the excerpt, rather than the title itself.

    Shot of the actual post: https://prnt.sc/ldff8x

    Shot of the current excerpt with the heading I'm referring to highlighted: https://prnt.sc/ldffl8

    Thanks again.

  •  2,699
    PenciDesign replied

    Hi,

    Ah, I understand it now.

    If you want to do that, you need to use custom exceprt - that's only way to do that. Check this video tutorial to know how to use custom excerpt.


    Best Regards,

    PenciDesign