PDA

View Full Version : Where is main Wordpress HTML file?


Myra
06-11-2006, 01:34 AM
I'm sure I'll be embarassed with the answer, but what better place to be embarassed?

Does anyone know the file name and directory location for the Wordpress main blog page? I mean, I know it's mostly php files but the source code is html. So when I view the source code, what and where is that file?

I set Wordpress up so that it's in the "blog" directory at root. Then the main directories: wp_admin, wp_content, wp_includes is under there, and so on.

The only change I made to the basic install was using a different theme/appearance plugin, which is probably all style rather than content and I know where that css file is.

So, any answers about the html file will be much appreciated.

Thanks.

Myra

Myra
06-11-2006, 06:23 AM
Ah, never mind. I think the php creates the html, so there's no actual file. Well, I've been wanting to learn php. Guess now's a good time.

Myra

Myra
06-11-2006, 06:00 PM
Ok, here is more followup for anyone interested in customizing their wordpress blog beyond just adding a theme, i.e., you want to change some content. I want to do this to add navigation back to the main website.

To summarize what I've learned at the WP forum (nice folks there):

The php files contain both php code and html markup. If you only change parts of the html markup, you don't need to learn php.

Inside each theme is the html for how the page looks. There is an initial page, index.php inside your theme dir which is basically a page that calls up the entries from every category and makes a list.

The index.php page will call header.php, sidebar.php, and footer.php. Header is all the html until just past the body tag, sidebar is the side navigation html, and footer closes off the page with the closing body and html tags.

There are other pages that have slightly different tasks, like single.php, archives.php etc. They all want to do different things on the page, like display a single post, or display all posts from a single category, but they will all generally call the header and footer into the page, and often the sidebar.

By having common header, footer, and sidebar files, each page will built pretty much the same. A lot of what you want to customize will be in the header, footer, and sidebar files. These files frame the page. To get specific in the middle of the page with the meat of the content, look to index.php, single.php, archive.php, archives.php, etc.

The bottom line is, if you want to change what appears, look to the php files, and look for the html within then.

(Still not sure I've located all the php files I need though...Well, stand by. I may be back.)

Myra