Display latest Wordpress Posts
This mod assumes that you use the Wordpress blogging software and uses the same database as your xcart software.
If your wordpress and x-cart use separate database then use this code for blog_headlines.php If you do not use the default Wordpress SQL table prefix than you will need to specify it in the select query. For example, change wp_posts to yourprefix_posts Create xcart-root/include/blog_headlines.php and paste this in it: Code:
<?php Create xcart-root/skin1/blog_headlines.tpl and paste this in it: Code:
{* $Id: blog_headlines.tpl,v1 09/01/29 11:18:59 max Exp $ *} Open xcart-root/init.php and add this at the end: Code:
#Blog Headlines Open xcart-root/skin1/skin1.css and add this: Code:
/*** Blog Headlines Styles Start ***/ Open xcart-root/skin1/customer/home.tpl file and add this within VertMenuLeftColumn (or where ever appropriate): Code:
{include file="blog_headlines.tpl"} |
Re: Display latest Wordpress Posts
hi autobulbs,
This seems nice mod. can you please tell me what I need to do if I am using different database for my x-cart & wordpress ? Thanks. |
Re: Display latest Wordpress Posts
HI autobulbs, nice one! what a great idea, bring x-cart sites up a sep.
just a tad too complicated for me to play with a live site. Do you have a live site running it today that I can see it working? |
Re: Display latest Wordpress Posts
Hi crazyoval
Yes we have it running on http://www.bhpplus.co.uk/ (On the left, as Diesel News) Which is using the code in the original post. And also on http://www.autobulbsdirect.co.uk/ (Under Latest Automotive News) But this is a heavily modified wordpress so the code is slightly different, but the principle is the same. ---------------------------------------------- anandat, I will look into that later this week :) |
Re: Display latest Wordpress Posts
Quote:
I just ran across this post and I'm looking to do the same -- add most recent wordpress posts on my main x-cart home page. But my wordpress database is separate. Does anyone know how to do it? I've seen rss mods but this seems like a cleaner way, no? Or does the separate database complicate things too much? |
Re: Display latest Wordpress Posts
I did solve this, and here is how:
PHP Code:
|
Re: Display latest Wordpress Posts
I'm pulling in posts to X-cart sidebar using RSS via javascript from http://www.rssinclude.com/.
But I'm looking for a PHP solution. I think http://simplepie.org/ should be able to do it, but haven't dug in to figure it out yet. |
Re: Display latest Wordpress Posts
Quote:
Thanks Scott DeToffol rssinclude.com looks good as it's support twitter also. will try to play with this in next weekend. |
Re: Display latest Wordpress Posts
Quote:
Hi I have x cart Pro 4.1.9 and my wordpress is in my same folder(within blog folder) of my domain with different database.After Adding codes -#Blog Headlines include($xcart_dir."/include/blog_headlines.php"); at the end The entire store getting blank.How to solve this issue?? What is the exact codes for 4.1.9 Versions?? How to resolve this issue?? |
Re: Display latest Wordpress Posts
Hi,
Will it compatible with 4.4 version?? |
All times are GMT -8. The time now is 01:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.