View Single Post
Old 08-14-2009, 01:52 PM  
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
this is what i call expert advice




Quote:
Originally Posted by harvey View Post
pffft, I thought you already had the content, hence the xml thing. If you still need to write it just do this: in your sidebar, include the following code

Code:
<div id="some-name"><?php echo get_post_meta($post->ID, "myreview", $single = true); ?></div>
And in your posts add a custom field called myreview with the text you want. And that's it, your problem solved in 2 easy steps (I recommend you to add a text field area for that custom code so it's easy to see what you write, you can edit functions.php or grab one of several existing plugins to do it).

PS: since you will want this only in single.php pages, be sure to either call a sidebar2.php (with the same content as sidebar.php PLUS the review) or call the review outside the sidebar code and adjust the placement of the div. I recommend you the first approach. Of course you can load the sidebar.php with conditionals (if single.php load something) but it seems to me you'll have more trouble this way
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote