The holiday passed so fast. During the holiday I self-studied some PHP basics and looked at how predecessors play with WordPress.
I hope to revamp the club site, turning the “admin’s” site into everyone’s site, and hope members actively participate. Whether or not everyone can participate, let me tell you how to use WordPress functions in your own pages.
First, you need to create a new PHP page, then at the top you need this line of code: <?php require("wp-blog-header.php");?> Note the path — whether to add ../.
[php]
After adding the require("wp-blog-header.php"); line, this page can use WordPress functions.
How to use the site’s header and footer info? You need the following code:
[php]
//outputs the header, i.e., the content of header.php in the theme //outputs the footer, i.e., the content of footer.php in the theme //outputs the right sidebar, i.e., the content of sidebar.php in the theme[/php]
Now you can make a simple PHP page, but it still looks like a static page. How to get WordPress articles? Use WordPress functions. More functions later. Now you can try your hand.
