W
W
W1zer2015-10-27 20:15:29
PHP
W1zer, 2015-10-27 20:15:29

How to add your own php scripts to wordpress?

There is a php script/file that outputs information from the database, how to connect it? In which place?
What would for example be the conclusion on the main. And then if I add it in the usual php way, then it is not displayed and the WP functions behind it too.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2015-10-27
@dimonchik2013

scanlibs.com/wordpress-dlya-professionalov-razrabo...

A
Alex, 2015-10-28
@mr_ko

The script can be included in the functions.php file of your active theme. In order for Wordpress functions to be available in your script, you need to include:
The path is specified for the file that lies at the root of the active theme.
And you need to display it on the main page depending on how the topic is arranged for you. If the settings are "your latest entries" joxi.ru/vAWRwgySv6n92W , you need to look at the index.php or home.php file of the theme (depending on the theme, it may be different). If a static page is specified, you need to look at page templates.
There are a lot of different options and nuances.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question