Answer the question
In order to leave comments, you need to log in
How to properly display php inserts on wordpress pages?
Hello! There is a site on wordpress where I want to display reviews from discussions of VKontakte groups on different pages. Why do I get a generated json object through the VKontakte api, which I am going to parse and display under the page content.
Question: what is the best and correct way to display such constructions: in the functions.php file of the theme or is it possible to add an additional field (plugin) with a php insert on the necessary pages?
Make it so that it is most convenient when editing.
Answer the question
In order to leave comments, you need to log in
It's best to make a shortcode (it's very simple) and write something like this in the right places on the right pages.
You can also install the Enhanced Text Widget plugin, which allows you to insert php code into your widget. Accordingly, with the Dynamic Widgets plugin and your sidebar, you will display it on the pages you need (or rather, under the content of these pages). But this is a "dirty" method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question