Display latest WordPress Posts at X-cart

Here’s my solution using RSS and a Smarty plugin to pull the latest posts from any wordpress blog. Create this file include/templater/plugins/function.sr_wpfeed.php: trigger_error(‘Error reading XML file’,E_USER_ERROR); } $posts = array(); foreach($xml as $item){ for($i=0; $iitem); $i++){ if($i (string)$item->item[$i]->link , ‘title’ => htmlentities($item->item[$i]->title,ENT_COMPAT, ‘UTF-8’) , ‘description’ => $item->item[$i]->description ); } } } $smarty->assign($var, $posts); } ?> […]

Read More

How to install multi wordpress blog under one database?

Sometimes we only have one mysql database, and we have several domain names. How to install wordpress for each domain under one database then? Here is an example, say:   www.eyewearsaver.com, www.opticalsaver.com, www.eyeglassessaver.com, www.eyewearsave.com, and www.glassessaver.com.

Read More

WordPress and SimplePie Skills

I have used SimplePie for 2 years, and found it very useful, here are 2 skills I’d like to share with you. Skill 1: Prevent show disordered characters if your goal site is using non-UTF8 code, such as iso-8859-1.   Befor   $feed->init() add the following code: $feed->set_output_encoding(‘iso-8859-1’); Skill 2: Show multiple feeds ( feeds sort by time […]

Read More

How to show 5 WordPresss Random Categories?

If our wordpress blog has many categores, say 5000 thousands, we can not show them all at sidebar. For seo purpose, we have to let search egnines to spider categories or posts without any difficulth and easily spidered. We can use many methods to achieve this, we can show some random posts under a post, […]

Read More

How to displaying a posts current category and parent category?

We found that wordpress default templete or classic template does not show a post category’s parent category if the post category has its parent category. As we know a website inner link is also very important for human being reading or for seo purpose. The fucntion of “the_category” only a post category, not show the […]

Read More

How to show category description?

Do you find wordpress will now show category descriptions if you use default themes? Here is the method: Add: <?php if(is_category()){ ?> <div><?php echo category_description( $category ); ?></div> <?php } ?> at the end of header.php or footer.php If you use other themes, and you still can not find the categories description, the you can […]

Read More

Oopes! You forgot to selecta category

After I have set Default Post Category of wordpress 3.0.1 correctly, I found I can not post posts successfully, the wordpress show: Oopes! You forgot to selecta category! How come, I am sure I have set Default Post Category already! I googled for half an hour, still can not find an answer. So I try […]

Read More