Answer the question
In order to leave comments, you need to log in
How to link category to posts?
Good afternoon. I ran into a problem that I can't seem to solve. The idea is this. Each category must have its own unique number and it must be divisible by the number of posts in this category and also recorded in each post of the category.
My tests:
Decided to do everything through custom fields. I set an arbitrary field for the category, but it is not displayed in the post card. Used the the_field() and get_field() functions.
After that I decided to go the other way. Write a number in the description of the category itself and display it in the post card. But then on the wp-kama website I found out that the category description is applied only on the page of the category itself.
Completely confused. Write who knows how it can be implemented?
Answer the question
In order to leave comments, you need to log in
Decided to do everything through arbitrary fields. I set an arbitrary field for the category, but it is not displayed in the post card. Used the the_field() and get_field() functions.
the_field('custom_field', 13 )
After that I decided to go the other way. Write a number in the description of the category itself and display it in the post card.
Each category must have its own unique number and it must be divisible by the number of posts in this category and also recorded in each post of the category.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question