How do I map my php files (like a file that is supposed to be the page "blog" and it contains all the html and php) to the actual page the html is supposed to be marking up many thanks note: I would prefer to do this using page name instead of I.D.
1 Answer
Use page templates, an overview can be found here: http://codex.wordpress.org/Page_Templates
Edit for those afraid of dying links:
A page template file should be placed in the theme folder, with any name you like. In its header, it should have
<?php
/*
* Template Name: My Custom Page
* Description: A Page Template with a darker design.
*/
// Code to display Page goes here...
In admin menu, each page will have the option to be assigned the template My Custom Page
and this file will be used to show the page's content. As a starting point, you could copy code from page.php or if that doesn't exist, index.php
-
1Can you edit your answer to include the relevant parts from the linked page? Or at least a little more information than "go here"? If that page gets moved or deleted, or the site is down the answer becomes useless– Tom J Nowell ♦Commented Sep 13, 2014 at 19:42