I am attempting to display the latest 3 posts from my blog, On my Opencart site.
The WP blog is at a subdomain blog.domain.com
I am adding this to footer.tpl in OC
<?php
require('/var/www/vhosts/blog.domain.com/wp-blog-header.php');
?>
But when i do this i get this error...
Notice: Constant DB_PASSWORD already defined in /var/www/vhosts/blog.domain.com/wp-config.php on line 29 Warning: mysql_connect(): Access denied for user '<>'@'localhost' (using password: YES) in /var/www/vhosts/blog.domain.com/wp-includes/wp-db.php on line 1036
From what i have been reading this is being caused by having 2 DB_PASSWORD defined, assuming that these would be 1 for WP and 1 for OC.
Is there anyway to work around this?