Custom Fields
Re-Envisioned
Support MB Views Insert field "Post term list" outputs with anchor tag

  • Creator
    Topic
  • #28469
    Resolved James 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #28475
    James Joseph Finn
    Participant

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

    #28485
    Long 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 Finn
    Participant

    Thank you, sir! Worked like a charm!

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