Support » Fixing WordPress » How to add new page

  • Dear All

    After 4-5 days of war with WP I am able to create my own theme and tested, working fine.

    Demo

    Above is a demo of the site(html only), now converting it in CMS.
    Now how can I create other pages of this site.

    I already created following pages-
    1. style.css
    2. header.php
    3. index.php
    4. footer.php

    But now I am stuck how can I create other pages and how to link them with the menu like –
    you all can see 4 link at the top – Top|Profile|Enquiry|contact Us
    Just I need guidance how to create page for these links and how to link.

    Regrads to all

Viewing 15 replies - 1 through 15 (of 18 total)
  • I suggest that you start by reviewing Theme Development.

    Thread Starter vishalon

    (@vishalon)

    Thank you Esmi

    Actually I am new to WP and also gone thru the Doc but I am confused after reading this-
    index.php
    The main template. If your Theme provides its own templates, index.php must be present.

    front-page.php
    The front page template, it is only used if you use a static front page.

    home.php
    The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.

    single.php
    The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.

    Please it is will great if you guide me. My site in CMS not a blog

    Regards

    Where is your confusion with this?

    Thread Starter vishalon

    (@vishalon)

    I already created index.php

    Then what is the use of front-page.php and home.php
    When to use front-page?
    When to use home.php?
    and which page I have to create for other pages of my site?.

    Thanx

    front-page.php is only used if you have a static front page.
    home.php really just replicates index.php. I usually suggest that you do not use a home.php file.

    Thread Starter vishalon

    (@vishalon)

    That means I donot need any of these 2 pages because my home page purpose is already solved by index.php, if I understand what you said.

    Then which type of page I should use for profile, contact page.

    Give some guidance.

    Regards

    That means I donot need any of these 2 pages

    Correct.

    Then which type of page I should use for profile, contact page.

    Your theme will need a default page template file – called page.php. You can also create as many custom page templates as you want/need but it’s rare to have more than a couple.

    Thread Starter vishalon

    (@vishalon)

    Thanks ESMI for your guidance showing me the way basically I am a ASP.Net guy. This is my first experience with WP.

    So Now I will create 2 php pages – profile.php and contact.php

    I am going in right direction

    Regards

    No, you don’t need to create new php templates for any of this.

    You write the content of the pages you want in the Editor. (Dashboard > Pages > Add New). WordPress recognizes that the content in question is a page, and uses the page template to display it. You’re way overthinking it.

    Thread Starter vishalon

    (@vishalon)

    Is it so easy…..
    Let me check it

    You don’t need to create a template file for each static Page that you want to publish. You only start looking at custom page templates if one or more of your Pages needs a substantially different layout or very different functionality. For the time being, just create page.php. WordPress will automatically apply that template to all of your Pages.

    Thread Starter vishalon

    (@vishalon)

    OK I create a page as you instructed and Saved as draft and in header I made this change
    <li class="li1"><a href="<?php bloginfo( 'page.php' ); ?>">CONTACT</a></li>

    Ooppssss… Something wrong
    Object not found….

    Error 404…

    try to read the corresponding codex chapters if you use a WordPress fuction;

    for instance:
    bloginfo http://codex.wordpress.org/Function_Reference/bloginfo

    also study: http://codex.wordpress.org/Template_Hierarchy to see what template does what

    Please read up on Navigation Menus in the Codex (both incorporating them into a theme design, and using them as an end user). You should not be incorporating each page into your header individually: The menu functions exist for this purpose.

    Thread Starter vishalon

    (@vishalon)

    Hi Alchymyth

    Thanx for consideration and time

    When I click preview page link on Edit Page it shows the page but when I click on contact link It is giving and Error 404

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘How to add new page’ is closed to new replies.