Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have an existing website with html, css, js, and image files that I am trying to convert over to wordpress.

I installed a clean local install using mamp on my hard drive and created a new child theme folder that references the twenty eleven theme. My style.css, header.php, footer.php, and index.php files are customized. When I load the main page in my browser it loads exactly as it should.

Now my problem is that I am trying to create the other content pages for the website...about, services, etc.. I created an about.php file and included the header.php and footer.php as I did in the index.php. I also put in the html as well. When I try to link to this page or visit it in the browser I simply get a page not found error. This is how I am referencing my links in the menu of the header.php file...

<a href="<?php bloginfo('stylesheet_directory') ?>/about.php" title="About">about</a>

Am I linking incorrectly? Am I doing the entire process incorrectly? Really confused about how to link the remainder of those content pages...I have all of the html and css ready to go just need to know this.

Help would be greatly appreciated thanks in advanced.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Theme/Parent Theme/Child Theme usage is irrelevant here. Content is not added via Theme template file, no matter what Theme you use. Go to Dashboard -> Pages, and add new static Pages for each of your site's pages. WordPress will generate them, and the Theme will display them.

Edit

ok so I figured out that I need to add a new page.php into my theme folder so that it will overwrite the original display correct? What I can't quite figure out is how to generalize the page.php so that it will display the content for each page.

It sounds to me like you need to do some Codex research, starting with Theme Development, and then Stepping Into Templates.

The content of each static Page - as with the content of each blog post, or any other post type - is output in template files by the Loop, but without the fundamental understanding of how WordPress Themes work (see Codex links above), it doesn't make much sense to get into further details at this point.

share|improve this answer
    
is that the only and/or best way to do so? I thought there was a way to do it via .php files in the theme folder? –  Marques Feb 17 '12 at 5:38
    
@Marques You can use templates in the themes folder, but you will still need to create a custom page to apply the themes to. –  m0r7if3r Feb 17 '12 at 12:55
    
Themes - and Theme template files - are for presentation of content, not for creation of content. If you need to create a customized presentation (layout/style) for particular content, then you can certainly do so via custom page templates - but even then, you don't create/store the content itself in the custom page template; rather, you create/manage/store the content in WordPress itself. –  Chip Bennett Feb 17 '12 at 14:03
    
ok so I deleted about.php and took the code (minus the header.php and footer.php includes) and pasted it into a new page called about. I was finally able to link to the page and see the content. However it doesn't seem that any of the styling applied and there is a comment box underneath. How do I now go about getting it to look as I originally coded it? –  Marques Feb 17 '12 at 15:02
    
ok so I figured out that I need to add a new page.php into my theme folder so that it will overwrite the original display correct? What I can't quite figure out is how to generalize the page.php so that it will display the content for each page. –  Marques Feb 17 '12 at 15:45

I know this was a while ago but you would use this...

<a href="<?php bloginfo('url'); ?>/about">about</a>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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