Wordpress pages and load_template()
just a quick note so I won’t forget… the load_template() can be called from within a page template, and if I understand it correctly, that could save up a few sql queries when used in conjunction with a query_posts() call.
Here’s an example from the codex page on Pages
<?php
/*
Template Name: Blog
*/
?>
<?php query_posts('cat=-0'); //gets all posts
load_template( TEMPLATEPATH . '/index.php');
?>
That might come in handy sometime, like right about now.
Using WordPress more as a CMS than a blog tool way can be quite frustrating from time to time. As of late, I’ve been struggling with the built in upload functionality… Why is it that the metadata for the uploaded files are stored in the wp_posts-table?! Really can’t see the point with that at all. And if you would want to use anything else than the WYSIWYG editor, you’ll find yourself in a world of pain.
Probably need to read up on what the plans for future versions are, before digging deeper into the rather confusing inner workings of this thing…
0 comments so far. Go ahead, write something
You can follow any responses to this entry through the RSS feed
Type here: