L
L
ligisayan2016-04-05 20:57:23
PHP
ligisayan, 2016-04-05 20:57:23

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

1 answer(s)
A
Alexey Nikolaev, 2016-04-05
@ligisayan

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 question

Ask a Question

731 491 924 answers to any question