Reputation: 23352
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()
Upvotes: 0
Views: 186
Reputation: 19380
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:
Upvotes: 3