I have an HTML-based website that has a traditional 3-column layout. The left side is a navmenu, the center houses the main content, and the right column has “modules” (or widget) I call in using some basic php includes.
When I’ve done a music review, I’ve had a little box from Amazon MP3 display specific to the album I was reviewing. An example can be seen here: http://goo.gl/r2q4B
I’m trying to migrate into WordPress, and I was wondering if there is a way to basically replicate this. I thought maybe there’s a way to go into sidebar.php and set up some custom code that looked at the specific article it was being displayed on and took a variable passed from that page to complete the custom code, therefore creating the Amazon MP3 box. The reason I say this is because, if you look at the source code for the page I linked (CTRL+F “get this album now”), the Amazon code basically stays the same, except for what I imagine is the product ID for Amazon (here, B0055DOV66). So, theoretically (at least in my mind), if I had a code set up with some sort of variable in place of that product ID, and the article itself somehow passed this product ID (if it could be declared inside it), then it would possibly complete that box code altogether.
However, I’m not really sure of the syntax that would/should be used in the sidebar.php file, nor am I at all sure how to pass the variable from the article to be accepted by the sidebar.php
Any ideas? Thanks.
- The topic ‘Dynamic sidebar module for WordPress’ is closed to new replies.