Best way to dynamically load with WordPress
-
Just out of curiousity, what’s everybody’s personal opinion on the best way to dynamically load objects within a WordPress site?
There’s already a hefty amount of information being loaded every time a page is accessed, and while I’m sure not only my server but WordPress itself can handle tacking on quite a bit more before it started to visibly lag, I would prefer to design my site with the thought in mind that if it’s not immediately necessary, it shouldn’t be resident in memory.
My first attempt seemed to me to be the logical choice, but it failed immediately;
if (is_page('slug')) { include (TEMPLATEPATH.'/lib/codex/theme/theme_codex.php'); add_shortcode('theme_codex', array($theme_codex, 'shortcode_func')); }To make a long story short I’m building a database driven codex of available themes for my MU site. I figured using is_page to make sure I was where the code was necessary before loading it would work right out of the box, but it doesn’t. Not even with plain old is_page().
While I go try to think of the next most obvious answer, I was wondering what your methods were.
The topic ‘Best way to dynamically load with WordPress’ is closed to new replies.