Wordpress - Adding a page made using Dreamweaver?

Status
Not open for further replies.

chini

New member
Jun 10, 2008
126
2
0
Ok well basically i have a wordpress blog, PR4 and installed in public_html. I want to add a html/css page i created to the blog. I tried add a page/post in the wordpress console, but it only allows html (how do you connect the css to it?)

I then tried adding the page (which is a simple html file) into the public_html directory, but to access the page it ends with .html Which looks stupid.

So i was wondering if anyone can recommend the best solution to this problem, which i have over-looked?
 


in your wordpress template (public_html/wp-content/themes/yourtheme/) you can link to your .css file in the header.php file

Just make sure you don't have classes or id's that conflict with the one's your template uses (ie, both have a class with the same name) - it will use the one that is listed last and overwrite the initial ones.

and just because the file name ends with .html doesn't mean it looks stupid. the people you are selling to don't know the difference
 
Ok well basically i have a wordpress blog, PR4 and installed in public_html. I want to add a html/css page i created to the blog. I tried add a page/post in the wordpress console, but it only allows html (how do you connect the css to it?)

I then tried adding the page (which is a simple html file) into the public_html directory, but to access the page it ends with .html Which looks stupid.

So i was wondering if anyone can recommend the best solution to this problem, which i have over-looked?

Open up your newly created html/css page and add this snippet of code at the very top:

Code:
<?php
/*
Template Name: Name Your Template
*/
?>
Upload it to your theme folder, add a new page...enter a title that matches with what you want your page to be called, for example: yourdomain.com /discount

You name the page "discount".

Then below you see the option to choose a template for your page, you've just uploaded your new template and gave it a template name, select that template and your page "discount" now shows the page you've created.

And now it's part of your overall WordPress theme.
 
  • Like
Reactions: bb_wolfe
thanks Edwin, i did exactly what you said and uploaded the template. It works, but the images are not being displayed. I put the images in the image folder of the theme.
 
nice tip Edwin -

chini, as far as the images, you just need to check the paths to make sure they are correct. open the page in your browser, look and see where the images files are pointing to.
Try changing them to /wp-content/themes/yournewtheme/images
 
To prevent yourself from any headaches since you're working with WordPress and WordPress will look for the theme path just use this line to include in your header file:

Code:
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/yourstylesheet.css" type="text/css" media="screen" />
 
actually, this doesn't help. the topic here is wordpress, not static .html pages. there are no html files in wordpress. it's database driven.

Edwin has solid advice (again) listen to him

Hi,

In order to link the CSS file to your HTML file you need define the link in the head area of your HTML file:

<head>
<title> </title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

Your stylesheet needs to be in the same directory as you .html file in order for this to work. Otherwise, you will need to specify the path to your .css file if it's in another directory/folder e.g. href="styles/stylesheet1.css".

Hope this helps :)
 
Status
Not open for further replies.