1

I want to show the wordpress posts on the magento2 page . SO I have enabled the fishpig wordpress integration extension .

And call/added the block code in the magento page content. {{block class="FishPig\WordPress\Block\Post\ListPost" name="wp.post.list" template="post/list.phtml"}}

So it gives the setConnection() exception errors

Points : I have used the different databases for word press and magneto.

How to integrate fish pig code get the posts from the word press database ?

Is i need to add the word press database in the any magneto 2 file ?

Please help me how to possible that ?

enter image description here

How Can i show the post detail page on click READ More button of the posts on the magento site ?

Now it is redirect to wordpress site (post detail page ) .

My Site installation directory is /news .

Site URL is : www.example.com/news

Home URL is : www.example.com/latest-news

Magento wordpress configuration showing this error

Your home URL (https://www.example.com/latest-news) is invalid. This URL (www.example.com/latest-news) showing the list of posts but issue is post detail page redirect to 404 page .

jagjeet
  • 35
  • 1
  • 9

1 Answers1

0

You need to upgrade the extension to the latest version as this bug has now been fixed.

Ben Tideswell
  • 1,697
  • 2
  • 11
  • 14
  • Hi @Ben Tideswell , Thanks , This exception is removed after upgrade the extension . I have used the latest extension 1.0.0.40 . but Now while i am call the block {{block class="FishPig\WordPress\Block\Post\ListPost" template="post/list.phtml"}}. This function return the empty value $this->renderPost($post). please help me what is issue ? – jagjeet Mar 08 '17 at 11:16
  • I have changed the code . Now It is working fine , '{{block class="FishPig\WordPress\Block\Post\ListPost" template="recentposts.phtml"}}' ,recentposts.phtml is my custom phtml file . I have another question . How Can i show the post detail page on click more button of the posts on the magento site ? Now it is redirect to wordpress site (post detail page ) . – jagjeet Mar 09 '17 at 05:49
  • It sounds like your home URL is set incorrectly in WordPress. Without more information on your setup, it would be difficult to say. I recommend following the installation tutorials exactly: https://fishpig.co.uk/magento-2/wordpress-integration/#docs – Ben Tideswell Mar 09 '17 at 11:54
  • I think you are right . in admin dashboard this error is showing "Your WordPress Home URL matches your Site URL (https://www.example.com/news). Your SiteURL should be the WordPress installation URL. The Home URL should be the integrated blog URL." . And this is my /news is my installation directory. – jagjeet Mar 09 '17 at 12:54