Issue
I tried to use the category description to add schema to the categories, but it automatically deletes the tag after saving it.
is there a way to prevent this in wordpress
after recording;
Solution
For security fields like this tend to be sanitized to prevent random scripts from being injected.
You are better off using wp_enqueue_script or wp_head
https://developer.wordpress.org/reference/functions/wp_enqueue_script/
https://developer.wordpress.org/reference/functions/wp_head/
Using wp_enqueue_script you could check against the category and have it add it that way which also makes it so it only shows up within that/those categories.
Answered By - Mark Truitt
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.