sole Posted April 28, 2008 Share Posted April 28, 2008 Hello all -! Just found this forum and it rocks - ! I have a wordpress 2.5 site I'm working on and I want to do something that I'm having mad problems with. I've made posts on the wordpress forum with no help. Here is what I'm trying to do: I put in a Key and Value when I create a post. I'm trying to call this Key and the Value within this statement: Here is the default: <?php get_sidebar(); ?> I put this in there and it worked great... but... I can't do this as I'll have TONS of pages and the list will be crazy long. <?php if (is_single(7)) {include ('sidebars/sidebar5.php'); } else if (is_single(10)) {include ('sidebars/sidebar3.php'); } else {include ('sidebars/sidebar.php'); } ?> is_single means it is a post and 7 is the post number. What I setup was a key field named: "side" and put a value of "sidebars/sidebar5.php" so every page that used sidebar5 I would put in that value. Am I going the wrong way? I've tried all of the code options I could think of... started out with the one below and needless to say it didn't work...! <?php {include ('<?php echo get_post_meta($post->ID, "side", $single = true); ?>'); }?> Quote Link to comment Share on other sites More sharing options...
sole Posted April 28, 2008 Author Share Posted April 28, 2008 Any ideas? I'm mad stuck.... ??? :-\ Quote Link to comment Share on other sites More sharing options...
sole Posted May 3, 2008 Author Share Posted May 3, 2008 Anyone? :-\ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.