I'm not sure if I'm doing this the right way.
What I want to do is to include a different slideshow with every different page. Each slideshow includes 4 or 5 images and is 4 or 5 lines of HTML
I would like to include this on the page.php as a <?php include ()?>
And I would like the include file to be determined by a custom field with the name "slide".
So if I create a page and the custom field has the value "home-slide", I would like the page.php to spit out:
But I can't work out how to achieve that in the loop. I have tried:Code:<?php include(TEMPLATEPATH . '/home-slide.php'); ?>
andCode:<?php include(TEMPLATEPATH . '/<?php echo $slide; ?>.php'); ?>
but they don't work.Code:<?php include(TEMPLATEPATH . '/<?php echo get_post_meta($post->ID, 'slide', true); ?>.php'); ?>


LinkBack URL
About LinkBacks
Reply With Quote
