Insert field "Post term list" outputs with anchor tag

Support MB Views Insert field "Post term list" outputs with anchor tagResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28469
    James Joseph FinnJames Joseph Finn
    Participant

    Hello,

    When I insert field "Post term list", the value is output on the front end wrapped in an <a> anchor tag. How do we disable this? I'll create my own links.

    Thanks,

    James

    #28475
    James Joseph FinnJames Joseph Finn
    Participant

    Any way to just get the tax field value clean, without being wrapped in an <a> tag?

    #28485
    Long NguyenLong Nguyen
    Moderator

    Hi James,

    Thank you for reaching out.

    You can use the function strip_tags to remove HTML tags from the list. For example:

    {% set term_list = mb.get_the_term_list( post.ID, 'category', '', ', ' ) %}
    {{ mb.strip_tags( term_list ) }}
    #28497
    James Joseph FinnJames Joseph Finn
    Participant

    Thank you, sir! Worked like a charm!

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