Rhys Drury
Rhys Drury

Reputation: 315

Adding my own static webpage to a wordpress site

If my title wasn't clear, basically what I'm trying to do is to add my own HTML or PHP page to Wordpress, so i can play around with some web dev.

So essentially I just want a test page/pages added to my site. However since I have installed Wordpress on my website, I can't just add "index.html" to my root folder using my FTP client. I wonder if I can/can't do this and if so how to link to the pages I add using FTP.

Sorry if this doesn't make any sense. I just want to add some of the sites I've already made / ones I am creating to my site so I can easily show clients/employers what I can do, and I apologize again if I'm being an idiot.

Upvotes: 1

Views: 3571

Answers (4)

Martin Y.
Martin Y.

Reputation: 71

the other way to do this... create a page template in wordpress

  1. create a php file named: template_mypage.php

  2. You must put this php comment line at the top of your template file:

    /* Template Name: My Page */

  3. go to wordpress backend and create a new page

  4. in the "Page Attributes", you can find a drop down list named "Template". In the list, you should be able to find "My Page"... select it and then save your page.

  5. view it!

Upvotes: 4

Nile Flores
Nile Flores

Reputation: 21

Why not use WordPress and put your portfolio together using Custom Post Types? I recently presented on this and there is a handy plugin for Custom Post Types UI that you can create a whole new section of your site and make templates for your portfolio.

Just a thought.

If you do a static page in WordPress, you can still template using the Page system as specified in another comment. Code your page, separate it into header, footer, content, etc files. You can load the file to your root, but not name it index. If you do a subfolder, you need to not have an existing page in WordPress.

HOWEVER, you can still do a "halfway" static page still using WordPress and do a header-staticpage.php, index-staticpage.php, and footer-staticpage.php and make sure to include the code for WordPress header and footer in the new header and footer so you can still reap the benefits of the default jquery that WordPress allows. Don't forget to name your template and when you create the page in WordPress, you can just leave the content area blank if you have hardcoded the page's content in.

I still recommend trying Custom Post Types. It is not hard and there are some great presentations in Slideshare that cover this aside from the plugin I mentioned earlier in this comment.

Upvotes: 0

BenM
BenM

Reputation: 53246

Create a sub-directory in your root folder and then simply link to it:

www.domain.com/mysubdir/index.php

Upvotes: 4

CodeMonkey
CodeMonkey

Reputation: 2295

You can always create a subdomain or create a folder inside public_html/www/ and redirect it from any other domain or from any static link you have on wordpress

Upvotes: 0

Related Questions