Site logo

[Resolved] Is it possible to preserve hyperlinks in the summary section of a query loop?

Home Forums Support [Resolved] Is it possible to preserve hyperlinks in the summary section of a query loop?

Home Forums Support Is it possible to preserve hyperlinks in the summary section of a query loop?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2513228
    Yumei

    I created a custom query loop of posts based on tags. Some of the posts contain hyperlinks. The links in the summary section (not the post title) get stripped. Is there a way to add or preserve the hyperlinks?

    #2513286
    Leo
    Staff
    Customer Support

    Hi there,

    WordPress strips all HTML in the the_excerpt() function.

    You can use the custom excerpt metabox as a workaround:
    https://www.wpbeginner.com/plugins/how-to-customize-wordpress-excerpts-no-coding-required/

    #2513326
    Yumei

    Thanks!!! I’ll check out the link.

    #2513333
    Leo
    Staff
    Customer Support

    No problem 🙂

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