• Closed by: Marek
  • Closed on: 20.04.18, 14:55
  • Reason: Closed
  • Comment: Glad to help!

Ticket #12086 - Facebook widget in Blog sidebar

Hello,

I would like to add the Facebook feed plugin to the sidebar of the blog and I’m not sure how to go about it, is there a way to do it? I guess I have to add it somehow to displayRightColumn?

https://developers.facebook.com/docs/plugins/page-plugin/

Thank you.

Comments

Marek 18 Apr 2018, 22:14

Hi, Nuria.
Unfortunately there is no easy way to put Facebook feed through back office. It requires some code customisation

Nuria Triquell 19 Apr 2018, 01:36

Would it be possible to insert the code directly in the layout instead of using a module?

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/es_ES/sdk.js#xfbml=1&version=v2.12';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-page" data-href="https://www.facebook.com/StHippolytSpain/" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/StHippolytSpain/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/StHippolytSpain/">St Hippolyt Conceptos de Nutricion</a></blockquote></div>
Marek 19 Apr 2018, 12:38

Yes, you can
Open the file /themes/alysum/templates/layouts/layout-right-column.tpl
find following code:

{if $page.page_name == 'product'}
  {hook h='displayLeftColumnProduct'}
{else}
  {hook h="displayLeftColumn"}
{/if}

add following code after that:

{if $page.page_name == 'BLOG PAGE NAME'}
  YOUR CODE HERE
{/if}
Nuria Triquell 19 Apr 2018, 12:49

I can’t seem to find that code in the file. This is the Venedor theme by the way.

Marek 19 Apr 2018, 12:54

Oh, sorry.
But no problem, just find where the left column is and put that code there

Nuria Triquell 19 Apr 2018, 13:11

I tried with the code I posted above and tried to add it with <iframe> aswell, but it doesn’t show up.

Marek 19 Apr 2018, 23:13

we can help you with this customisation, but it’s not covering by support so it will cost some price

Nuria Triquell 20 Apr 2018, 12:43

We’re going to leave this for now and come back to it at later stage, but thank you.

Marek 20 Apr 2018, 14:55

Ok, let me know if you will need a help