0

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.

0

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

  • 1
    Can 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 Sep 13 '14 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.