Answer the question
In order to leave comments, you need to log in
How to display the content of the post in different places?
Good afternoon, on the single.php page, the post is displayed, in the post itself I have text, links to social networks, upcoming dates with content and many different elements, I want to scatter all these elements around the page, I don’t want to display the entire post in one div what the_content(); function does. Suppose I upload social networks in a post, how can I rip out these social networks and stick them where I need to?
Answer the question
In order to leave comments, you need to log in
If the elements are different all the time - use custom fields. Those. each post will have the fields you need, separate from the content. And then in the template via get_post_meta(); output these fields in the right places.
In general, specifically social buttons are inserted by handles into single.php and there are no problems.
Most often, plugins insert their code at the end automatically. Therefore, here it is necessary to look at each plugin.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question