Add related php code to sidebar
Hi,
I'd like to use a specific-tag related-post function like the below, but would like to use it in the sidebar. I have no idea how to do that :). Would really appreciate your thoughts. I tried clumsily to add it to footer.php, but I don't think that's the right way to do it (and nothing seemed to happen). I looked at the widget tabs in Atahualpa options, but didn't quite understand how all that works. Basically, I'd like to add the following functionality to the right sidebar. Code:
<?php |
add 'text' widget to the sidebar, add the code to it then get the 'exec-php' plugin
|
Quote:
Code:
Parse error: syntax error, unexpected '<' in /home/main_folder/public_html/mysite.com/wp-content/plugins/shortcode-exec-php/shortcode-exec-php-class.php(893) : eval()'d code on line 1 |
actually it is being executed, put
HTML Code:
echo 'hello there'; |
Okay, I think the problem is it needs to be in the loop so as to be called from tags in the post. When it's in the sidebar, it won't pick up the post's tags. If I put the code in the loop and then use exec-php with just this in a widget --
Code:
<div class="rel_posts"> |
All times are GMT -6. The time now is 09:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.