Magento上的Wordpress帖子 [英] Wordpress posts on magento

查看:100
本文介绍了Magento上的Wordpress帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一家magento商店.我想使用wordpress在其上添加博客网站(www.example.com/blog).为此,我使用了Fishpig的Wordpress Integration 2.2.7.我想为博客网站使用其他模板.

I have a magento store. I want to add a blog site(www.example.com/blog) on it using wordpress. For this, i am using Fishpig's Wordpress Integration 2.2.7. I wanted to have a different template for my blog site.

因此,我为wordpress博客页面创建了一个单独的模板.在页面顶部,我想添加最近帖子"滑块,即,我想显示该帖子的特色图片,其中几行内容带有更多信息"选项.内容中还将包含作者,发布日期等其他信息. 如何在博客页面模板上实现此目的?

So, i have created a separate template for wordpress blog page. On the top of the page, i want to add recent posts slider i.e, i want to display a featured image of the post with few lines of the content with read more option. Additional information like author, published date will also be there with the content. How can i implement this on the blog page template?

我的博客网站菜单导航也将不同于商店的菜单导航.

Also my blog sites menu navigation will be different from store's menu navigation.

我该如何实施?可以使用此插件或其他插件来这样做吗? 请给我最好的建议.

How can i implement this? Is it possible to do so with this plugin or any other? Please suggest me the best.

提前谢谢.

推荐答案

您需要检索图片资源,然后获取图片网址

You need to retrieve the image resource, then get the image url

$_image = $_post->getFeaturedImage();

echo $_image->getAvailableImage();

看看Fishpig/Wordpress/Model/Image.php了解更多的url方法:

Take a look at Fishpig/Wordpress/Model/Image.php for more url methods:

public function getThumbnailImage()
public function getMediumImage()
public function getLargeImage()
public function getFullSizeImage()
public function getPostThumbnailImage()
public function getAvailableImage()
public function getImageByType($type = 'thumbnail')

这篇关于Magento上的Wordpress帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆