Ok = I’ve looked around a lot for a clear answer to this, but find very few real answers. I would really appreciate some info from experienced individuals.
A tiny bit of background. I’ve worked content generation (among other thing) on a largeish website for many years, and it follows the pretty basic file system and discreet html (.aspx) pages for content. You want a new page, you make a new file and build your content. Done. I’ve built a dozen or so brochure sites like this as well. This is the system that makes sense to me, and I find myself a little hesitant to veer away.
CMS systems, like WP, obviously do not work like this. I am not inexperienced with wordpress. I’ve built and implemented a couple custom themes, but have “tried” to make the above file structure work “along side” of a wordpress install – mostly leading to headaches.
That is where I currently sit, having spent a couple of months of weekends building my new personal site (which is almost finished). The format of the site is pretty straightforward – its a developer blog (I do a lot of AS3), a portfolio for artwork, and a main intro page that contains a bit of both.
My file structure looks a bit like so:
mysite.com-
/css/
/home/
/images/
/javascript/
/portfolio/
/php/ (holds a lot of php snippets that is included elsewhere)
/swf/
/wordpress/../theme/ (draws upon img/css/php in external folders)
index.php
While I do very much like the familiarity of this structure, the cross sharing of assets between static files and dynamic wordpress content is a pain. My option is to turn all static files into templates, and make use of WP’s database driven page system.
What do I stand to gain from “buying into” the WP system completely? Or, conversely, is a static file structure external to wordpress “workable” – and are there preferred methods of doing so?
I realize this question is somewhat subjective, however, the proper handling of static content is, I think, a quite valid point of inquiry (tho… you might not think it, considering how little info there is to be found on the subject).
Thanks
2 Answers
Put everything into WordPress. This way, you can search your entire content from the built-in search engine, and you can edit each piece.
If you need pages with special markup create templates for your theme.
Naked Template
<?php
/*
* Template Name: Naked
*
* Thatâs the complete template!
*/
Basic HTML5
<?php
/*
* Template Name: Basic HTML5
*/
?>
<!doctype html>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<title><?php wp_title( '' ); ?></title>
<?php
while ( have_posts() )
{
the_post();
?>
<h1><a href="https://wordpress.stackexchange.com/questions/18080/<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php
the_content();
}
Import
To import your old HTML pages use the plugin Import HTML Pages.