I have an opencart shop and wordpress installation running on the same server and I would like to grab a few articles and show them on the product page in opencart.
Here is the code I inserted on my product page template, however I'm having problems:
<?php
require('blog/wp-blog-header.php');
?>
<?php
$posts = get_posts('numberposts=3&order=ASC&orderby=post_title');
foreach ($posts as $post) : setup_postdata( $post ); ?>
<?php the_date(); echo "<br />"; ?>
<?php the_title(); ?>
<?php the_excerpt(); ?>
<?php
endforeach;
?>
I'm gettings this error
Notice: Constant DB_PASSWORD already defined in /home/admin/web/domain.com/public_html/blog/wp-config.php on line 29 ERROR ESTABLISHING A DATABASE CONNECTION
I know DB_PASSWORD is also used by the opencart config, is this the problem? And more importantly is there a solution to this problem?