• I am tiring to generate a page template for http://www.theimagineershome.com/blog/ to use in a mailpress plug in. I the followed the instructions at http://www.mailpress.org/ and transferred pt_MailPress.php to my wordpress nebula theme folder however I cannot figure out how to create a page using this template because I am only give the option in the Admin>Write>Page to use the current theme. Could someone please try to explain to me how to generate “Id of Page using page template ‘pt-MailPress.php’” as the instructions indicate I should

    I’d be extremely grateful.

    Jeff

    1. You will find a page template pt_MailPress.php in the /xtras folder.
    2. This template can be adapted to your current WordPress theme.
    3. This template must be in your current WordPress theme folder.
    4. You have to create a page with this template under Admin>Write>Page.
    5. The “Id of Page using page template ‘pt-MailPress.php’” field must be filled accordingly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Jeff,

    Now that you’ve added a template file to your theme directory, you need to deactivate and reactivate the theme (switch to a different theme, load your blog, and then switch back). Otherwise, WordPress doesn’t know you have a template file.

    After you’ve reactivated the theme, you *should* have an additional option on the Page screen for the new template.

    Thread Starter jeffocal

    (@jeffocal)

    Should but isn’t. I tried several time but no go. Any Ideas

    Jeff

    The alternative is to set the page template directly in the database itself. This is tricky, can cause a lot of problems if done incorrectly, and requires you to be somewhat adept at working directly with the WP database through phpMyAdmin.

    If you’re up to that, let me know and I’ll give you pointers.

    Thread Starter jeffocal

    (@jeffocal)

    Thanks Friend

    Jeff

    OK. Here it is step-by-step:

    1) Back up your site!
    2) Create your template file and upload it to the theme directory
    3) Create a blank (or populated) page to use this template – write down the page ID
    4) Log in to your database via phpMyAdmin
    5) Go to the wp_postmeta table
    6) Click “Insert” and put the following in the appropriate fields:

    meta_id -> leave this blank
    post_id -> the ID of the page you want to have the template
    meta_key -> “_wp_page_template”
    meta_value -> the filename of your page template, i.e. “custom.php”

    7) Click “Go” at the bottom of the page

    Now when you go to the page, it should pull up the custom page template just the way you want it. This isn’t the most elegant solution, but it works nonetheless.

    Let me know if that gets you where you need to be.

    Thread Starter jeffocal

    (@jeffocal)

    Thankd friend that worked

    Jeff

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘How do you create a template’ is closed to new replies.