views:

39

answers:

2

Hi, I've created an HTML page as part of my website which I would like to use as a template for news articles. The page has all the things it needs, it just needs to display the correct news article in it. I installed WordPress on my webserver and now wonder how I can have wordpress publish articles using my HTML page? Is this even possible since WordPress works with php? thanks

A: 

What you are talking about is themes. Wordpress allows you to create a theme for your installation so it displays using your html/css (more or less)

The way I do this is copy the default theme and make changes in there, and then you can switch to your new theme in your settings.

Edit: in addition, you can also load up wordpress on any page using:

include( '/path_to/wordpress_install/wp-load.php' );

This will allow you to use wordpress functionality on any page of your site.

Syntax Error
Okay, thanks.1. It seems to be the its default theme is split up into different parts of websites, like comments, footer, header, image etc...What should I do so WordPress aims for my .html instead of this default theme. I don't see this option.2. I don't get what your addition exactly does? What kind of functionality can I use on the page then?I just need simple postings of my to appear on my theme website so I don't have to create a static webpage for every article.Thanks!
Andy
I have a feeling the easier method for you will be to use the theme method rather than including wp-load.php. You will need to put the header of your html in the header file, footer in the footer, etc... I think this will be the easiest way for you to learn how it works and get your page working with as little work as possible. Just ignore the rest of the stuff I said for now, I included that just to be thorough and you will know if that's ever what you need.
Syntax Error
Okay, I just can't fill other parts like comments, sidebar etc.I simply need plain text to be displayed on my html page. There's space designated for plain text and it just needs to be filled that way. It doesn't sound very pleasant to me if I have to split my html page into parts, it'll be very difficult to alter the page as a whole. I'm using Dreamweaver.Again: just need wordpress to put plain text into a html page with designated space for it.
Andy
Well, if you find an easier solution let me know. BTW, if you don't want comments just erase that part, and in the long run it's way more pleasant to have site-wide elements like a header and footer in separate files, unless you're certain that your site is never going to grow.
Syntax Error
A: 

just edited the single.php file by pasting the desired html code and leaving the loop code there where the text needed to show up. didn't need to break up the page in a header, body and footer. Left out sidebar for now, but will put it back after I edit it properly.

Andy
that's nice, except when you update you will loose that edit. Wordpress supports post templating, you should look into it.
Mica
I don't understand, what will exactly be lost??
Andy