Is there any existing type of widget setups where i can display different code in a block of my menu for each associated post? Like a quick product review box? Better if it's tag based to flexibly integrate with my design.
wordpress question for the experts.
Collapse
X
-
Tags: None
-
well, yes, but for what he wants he'd need to load different instances of the same plugin/widget, which would be a pin in the ass and an unnecessary load in the server and database.
I think the best and faster way would be either custom fields or customize the theme to import data via XML.
ie, I finished a couple weeks ago a shopping cart that integrates WP with a 3rd party script and it has exactly that feature (different data for each product). That was done with a couple custom fields. Now I'm working on a multi webcam portal/community that loads info with different XML parsers and renders every 3rd party stuff with the look of the site and it works amazingly well, so I bet that would be the correct approach.
This being said, I'm not sure if I understand the question 100%This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truthComment
-
Comment
-
huh? i'm lost on that one...
what i need is to be able to include a specific piece of html for eachpost into the design, outside of the loop. like in my sidebar.
could i say, drop it into the excerpt. and in my single.php drop the_excerpt tags outside of the loop? does that work? can i create a second loop in single.php to show my extra html as the excerpt? would that work?
i want to include a little review in my sidebar for the site related to each post i make.Comment
-
I would say use custom fields like Harvey mentioned, then just call the custom fields on each post or page sidebar, or menu, wherever you want them.LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250
Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month.
AmeriNOC - Proudly hosted @ AmeriNOC!Comment
-
huh? i'm lost on that one...
what i need is to be able to include a specific piece of html for eachpost into the design, outside of the loop. like in my sidebar.
could i say, drop it into the excerpt. and in my single.php drop the_excerpt tags outside of the loop? does that work? can i create a second loop in single.php to show my extra html as the excerpt? would that work?
i want to include a little review in my sidebar for the site related to each post i make.
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
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 stepsCode:<div id="some-name"><?php echo get_post_meta($post->ID, "myreview", $single = true); ?></div>
(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 wayThis post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truthComment
-
this is what i call expert advice
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
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 stepsCode:<div id="some-name"><?php echo get_post_meta($post->ID, "myreview", $single = true); ?></div>
(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 wayDon't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888Comment
-
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truthComment


Comment