How to use strip_tags() for Query Loop Block in functions.php
-
Hello,
I have a custom taxonomy named “t”.
It’s displayed on my posts using strip_tags() so they won’t be clickable.
This is what I have on my PHP template:
$terms_as_text = get_the_term_list( $post->ID, 't', '', ', ', '' ) ; echo strip_tags($terms_as_text);
Now, I would like to do the same for the Query Loop Block: When I add my custom taxonomy to a Query Loop Block, I want them to not be clickable.
I believe this very easy to achieve, but I am self-taught and not a pro at PHP.
I am using a child theme for Twenty Twenty One Theme.
If someone could help me please to create a function for my functions.php file, I’d be so grateful!
Cheers!
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to use strip_tags() for Query Loop Block in functions.php’ is closed to new replies.