1

I am using Fishpig Wordpress Integration, I would like to display Next and Previous Post link in Post page. In Wordpress we can use posts_nav_link() but its not working in magento.

Please guide me if anyone have some idea

I want next previous link like on this url http://www.maisondelgusto.com/en/stories/el-poaig-olive-oil-can-tell-us-so-much/

0

androidjunky,

Use the function getNextPost() which give your the next post Object.

and getPreviousPost() give previous post object

$PreviousPOSTURl =$CurrenTPostOb->getPreviousPost()->getPermalink()
$getNextPostURl =$CurrenTPostOb->getNextPost()->getPermalink()
  • Thanks for reply Amit, but it gives error Fatal error: Call to a member function getPermalink() on a non-object in – androidjunky Feb 11 '15 at 11:50
  • is $CurrenTPostOb->getPreviousPost()->getId() give post id please check – Amit Bera Feb 11 '15 at 12:11
  • Do you know how to get pagination? in post listing page? – androidjunky Feb 11 '15 at 12:19
  • yes..i know it... – Amit Bera Feb 11 '15 at 12:21
  • :) Please tell me buddy, how to place pagination – androidjunky Feb 11 '15 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.