• Hello,

    first of all, I gotta say I absolutely LOVE wordpress. I tried to use movabletype but that was a disaster.

    okay, now to my question. I’ve setup my new blog (
    https://www.stickysf.com ) the way I want it except that I need to create a couple of custom pages such as “About Us”.

    I don’t know what you call them, but I want to be able to pull in the “template includes” such as the header and sidebar into this custom page. I don’t want the page to look like a posting though.

    In my naive thinking, I thought I could just create a page called about.php in the theme directory and that would automatically work, but of course that didn’t do anything.

    can someone shed some light on this please?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Admin -> Manage -> Pages

    you could set the slug to ‘about’ then the page would be
    https://www.stickysf.com/about

    Thread Starter asdkasdk

    (@asdkasdk)

    That didn’t seem to work:

    I created an about us page as you suggested:
    https://stickysf.com/?page_id=11

    but I don’t like the fact that it includes a category of “untitled” and also lists the date. I would like to remove that. And I also typed in “about” in the form titled slug, but that didn’t do anything.

    you need to setup permalinks to get the /about, vs ?page_id.
    Under Options–>Permalinks in your admin dashboard.

    Regarding the look of your Page, that is dependant on the theme. You can create or edit that Page template to reflect how ever you want the page to look.
    Pages#Creating_your_own_Page_Templates

    Thread Starter asdkasdk

    (@asdkasdk)

    okay, now we’re starting to get somewhere!! The permalinks is awesome, I love it!!! – thanks for letting me know about that miklb.

    Now, let’s assume I’m going to create a new template from scratch. How do I link my “about us” page to that template? I don’t see any option to do that in Manage > Pages > Edit.

    once you create your Page and upload it to your theme’s template, when you go to write-> Page, there’s a drop down for choosing your template, so assuming you call your custom page “about”, you would chose that.

    Let me piggyback on askdaskd’s previous questions. I still don’t get it. I am trying to create a new page template and set an existing page of my blog to that new template.

    I have created a new page template file in my theme folder, by copying an existing page file (I copied page.php from the default theme into the folder for my current theme, scp_flex, and I gave the new file a new name).

    Now, when I open the page that I want to assign to this new template (using Manage/Pages/Edit — bring me to the “Write Page” screen) — I do NOT have a drop-down menu for choosing my template.

    I DO have a box at the bottom of the screen that says “Add a new custom field to this post” — and that box has a drop down menu on the left that has just two values: “Select” and “wp_page_template.” There is a button at the right that says “add custom field” — but when I click on it, nothing much happens — the page refreshes, but nothing else.

    So, my questions:
    (1) Where is the drop-down menu to select page templates?
    (2) How do I get the new page template I have created to show up in that menu?

    Thanks.

    I’m guessing that there’s one template for pages — page.php. Not sure that giving it a new name would work. Perhaps someone else can help.

    Except the page.php itself which is the default Page template, all the other Page templates require several code line at the top > see the link in Codex posted above.
    Do you have those line in your second Page template?

    I am using the Scp_Flex WP theme. I see now that the designer did not give this theme any page templates. The theme came with no page.php file, archive.php file, etc. It does have an index.php, which (if I understand the Codex) should be the default. The resulting pages is formatted exactly like a post.

    So, I went to the Default theme, and copied the page.php file from that theme to my Scp_Flex folder. I named the file page-normal.php. Then, based on what you said above, I added the additional introductory lines of php at the top of the file.

    Below is what the file looks like now:with the first php command being what I just added, and the rest being what I copied from Defaul page.php.

    The file still does NOT appear in the drop down menu on the Write/Page screen that has the heading “Add A New Custom Field to this Post.” Is that where I should be looking?

    <?php
    /*
    Template Name: Page-normal
    */
    ?>

    <?php get_header(); ?>

    <div id=”content” class=”narrowcolumn”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2><?php the_title(); ?></h2>
    <div class=”entrytext”>
    <?php the_content(‘<p class=”serif”>Read the rest of this page »’); ?>

    <?php link_pages(‘Pages: ‘, ”, ‘number’); ?>

    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this entry.’, ”, ”); ?>
    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Let me clarify (and sorry if I wasn’t clear). The dropdown menu will appear in the Page Options section when you have in your theme:
    1 page.php template +
    1 other page template = at least 2 page templates

    Aha! I now have a Page Template drop down menu. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How do I create a custom page such as “About Us” page’ is closed to new replies.