
Originally Posted by
rainthebat
Thanks, fun stuff!
To get the blog on the home page I just added this code to the includes/languages/english/html_includes/define_main_page.php
(edited directly and ftp'd <- I don't think you can add php code through the admin editing way)
Code:
<?php wp();
require_once(ABSPATH . WPINC . '/template-loader.php');
$template = new template_func(DIR_WS_TEMPLATE);?>
That calls up wordpress with the first function. Then calls the template-loader.php file located in the wordpress-includes directory. This file has the $template variable in it, which is modified in the last statement so that ZenCart starts loading the rest of its template i.e. the right column.
Mind you, I have made other edits that have helped to make this work properly, so if you run into an error if you try this, let me know the error.
You can add following code to define main page to call posts from wordpress mod
Code:
<?php
require('./wp-blog-header.php');
?><?php
$posts = get_posts('numberposts=3'); // change to whatever number of posts to show
foreach($posts as $post) :
setup_postdata($post);
?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_date(); ?>
<?php the_content(); ?><hr />
<?php endforeach; ?>
as shown at
http://dezinashop.com/demo/index.php
Bookmarks