$10
How to get sidebar items from another database?
marshall | 05/02/10 at 9:07pm
| Edit
(6) Possible Answers Submitted...
-

Last edited:
05/18/10
12:38amLew Ayotte says:Do you have access to the database?
You can use PHP/WP to access the database and pull the values you need.
I had a similar issue access Pinnacle Cart from WordPress a few weeks ago... this was the code I used:
global $template,$wp_query;
if ( is_front_page() ) {
$pinn_db = new wpdb(DB_USER, DB_PASSWORD, 'saddle_pinn', DB_HOST);
$querystr = "SELECT DISTINCT url_default, name
FROM catalog c
WHERE c.parent = 0
AND is_visible LIKE 'Yes' ";
$pinn_cats = $pinn_db->get_results($querystr, OBJECT);
foreach ($pinn_cats as $pinn_cat) {
echo "<li><a href='/store/" . $pinn_cat->url_default . "' title='". $pinn_cat->name . "'>" . $pinn_cat->name . "</a>" . "</li>";
}
Lew -

Last edited:
05/02/10
10:00pmNo Mind says:You can use the plugin WP Custom Widget to add PHP code in your sidebar.
http://wordpress.org/extend/plugins/wp-custom-widget/ -

Last edited:
05/03/10
3:30amvipul jariwala says: -

Last edited:
05/04/10
6:51amWPMan says:Use "bluesome.net/data/2005/08/exec-php.zip" and add your PHP code to post/pages/sidebar.
Eg.
<?php
include('/path/to/database/connection.php');
?>
-

Last edited:
05/04/10
12:20pmAndrzej Zglobica says:I believe you might be asking for more detailed advice, some specific query code? - this depends on the stucture of the database you want to pull data from and some other circumstances. I guess this task might require more budget, just in case you might contact me so I can help you choose the proper solution: http://www.wpquestions.com/user/contact/id/530
-

Last edited:
05/04/10
1:09pm
This question has expired.
Current status of this question: Completed





