Archived content · Downloads, purchases and posting have ended.

Q&A)adding a blog to the front page of my zen cart.

2007-07-14

Q)
I'm looking at adding a blog to the front page of my zen cart.

A)
Admin > tools > Define Pages Editor > define_main_page.php
Please stick the following cords on there.

<fieldset>
<legend>Latest Post</legend>
<?php
 $posts = get_posts('numberposts=5');
 foreach($posts as $post) :
 setup_postdata($post);
 ?>
    <a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a>
    <?php /*the_content();*/ ?>
    <br />
 <?php endforeach; ?>
</fieldset>

過去のコメント / Archived comments

技術内容に関係するコメントを保存しています。投稿受付は終了しました。投稿者名・連絡先は掲載していません。

Comment #93

2007-12-02

Does anyone an update for this that works on the new version of Zencart, and ideally one that works with Ultimate SEO??

Comment #103

2008-02-22

I would love to get this to work too. I'm using Zencart 1.3.8.

Comment #106

2008-04-12

ok, after days of fiddling around with it...Here is what I came up with:

If you want it to be displayed just like on the [zencart url]/? page use this:

If you want it to just be a table with links to prior posts (like an archive) use this:

Archived Blog Posts

" id="post-">

Add a # after "numberposts=" but before the last ' to define how many posts you want to include here. I have not fully tested it, but I believe that if you leave it blank like that, it will include a link to *every* post to the blog.

Comment #107

2008-04-12

Ok, last post didn't work...let's retry this:

ok, after days of fiddling around with it

Comment #108

2008-04-12

ok, well..since neither one worked.....

whoever the mod is that has to approve the messages....could you please contact me with the proper way to post code in here.

Thanks

Comment #119

2008-10-01

I have a few questions:

1.- I need put a few blogs in my website. How i do?
2.- In this script I change
$posts = get_posts(

Comment #132

2009-01-07

This is a Zen Cart module with instructions on how to install Wordpress into Zen Cart.

Comment #133

2009-01-07

Sorry here's the link: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=681