T
T
Toster7772018-03-17 13:31:38
WordPress
Toster777, 2018-03-17 13:31:38

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?
5aacee8639009326669047.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-03-17
@Toster777

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 question

Ask a Question

731 491 924 answers to any question