Wordpress functions in other pages

by Kevin on October 19, 2008
in Journal

I have rediscovered a cool thing that can be done with Wordpress involving static pages. I run my site with a static index.php as the front page. It would be a massive pain in the ass to re-theme it every time I changed my Wordpress theme, along with any other pages I make. I remembered something in the documentation about adding a line of code to your php files and being able to access all the functions available in Wordpress and went looking, unsuccessfully.

I then remembered that the index.php file of a Wordpress install contains something like what I was looking for. I copied it (require(‘./path/to/wp-blog-header.php’) ) into the front page along with the functions to display the header, sidebar and footer (get_header(), get_sidebar() and get_footer() respectively) and found that it worked.

Full code for this is below (assumes that your wordpress install is in /wordpress and your page is in the root of your site)


<?php require('./wordpress/wp-blog-header.php'); ?>
<?php get_header(); ?>
<div id="container">
<div id="content">
<!--your stuff goes here-->
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
</div>
</body>
</html>

Back to Wordpress

by Kevin on October 6, 2008
in Journal

So I decided to move back to Wordpress. The benefits of using Wordpress as my weblog software far outweigh the negatives, for example, I can update from pretty much anywhere, managing posts is a lot easier, the plugins make my life a breeze (backups, crossposting to my livejournal, spam control), its just a better choice for me.

Don’t get me wrong, BashBlogger is pretty good but I got somewhat tired of having to hand type all the code for each entry and manually pushing the updates to the server. Plus the commenting system (emails copied and pasted into each entry manually) was crap.

I just can’t stay away from Wordpress, makes weblogs so easy.

Wordpress Again

by Kevin on June 26, 2008
in Journal

I am really bad at this indecisiveness. Back to Wordpress, update feeds etc.

The theme is the same as the pivot one, managed to hack it up enough to play well with Wordpress. Wasn’t too difficult. The footer style is subject to change.

Updates and stuff

by Kevin on June 7, 2008
in Journal

I think I’m pretty much decided on staying with Pivot, at least for the time being. The templates are a lot more configurable than Wordpress, being simple html with extra tags. No need to hack about with php, just find the tag for the thing I want and add it in, hit rebuild and done!

I may move back to Wordpress in the next few months, may not. We shall see. I like to tinker and may never be satisfied.

Go check out the install and remember to update the feeds.