Answer the question
In order to leave comments, you need to log in
How to create a field for entering code in a wordpress category template?
I have a lot of headings on my site, and for each heading I make some changes in the template, i.e. I add text blocks, buttons, links. I do all this through the template files, creating each separately and filling it (category-catname.php). But the fact is that the folder with the template is very clogged with similar files.
Please tell me how can I create a field in which I can enter HTML code, and it will be displayed on the page of each category, i.e. Does each category have its own HTML code?
Answer the question
In order to leave comments, you need to log in
Have you tried doing it through the Advanced Custom Fields plugin?
Create a custom field. For example, textarea and display it on the taxonomy/category edit page.
And greedily output this field via the_field('field_name') and that's it
More details -
https://www.advancedcustomfields.com/resources/tex...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question