简体   繁体   中英

Wordpress custom page

I want to make new custom page in wordpress where I can communicate with database and show results. I added one in root folder. It appears; but when I try to display menu, headers. It gives error.

Fatal error: Call to undefined function get_header()

Add Template Name: (some name) comment on top of script, and when you add new page in admin, select your new template. Also, this PHP script needs to be in /wp-content/themes/(theme-name)/ folder.

<?php
/*
Template Name: Portfolio
*/
?>
<?php get_header(); ?>

Here:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM