How to retrieve recent posts on the basis of its corresponding category in fishpig wordpress magento integration?
How to retrieve recent posts on the basis of its corresponding category in fishpig
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EDIT
The Fishpig WordPress module registers the current wordpress category as ‘wordpress_category’
So to answer the question in the comments as to how to get the current wordpress category dynamically:
The full example above would then become:
But you should probably be using the Fishpig_Wordpress_Block_Category_View block which will give you access to
$this->_getPostCollection()from within your template that essentially does everything above – why would you be coding this yourself when using the fishpig module?