Tagged: enfold, facebook, share button
-
AuthorPosts
-
November 12, 2015 at 3:02 pm #534793
Hi,
I would like to know in which file I have to place the following code on every page of the website (to insert a Facebook share button):
<! – Your code like button ->
<div class = “fb-like”
data-href = “<(ID) get_permalink php echo urlencode ($ post-)?>;?>”
Data-layout = “standard”
data-action = “Like”
data-show-sided = “true”>
</ div>As you see, the data-href is a dynamic URL.
I tried in the page.php in the enfold-child file, but it doesn’t work.
Could you help me ?Best Regards
November 12, 2015 at 4:27 pm #534868Hey mika2000!
We already include facebook in the social share bar that appears below each post. Your trying to add another one?
You could try around line 60 in the single.php file if you want to display it on your posts.
Regards,
ElliottNovember 12, 2015 at 4:49 pm #534886Elliot,
thanks for your quick answer.
However it doesn’t solve my problem.
I’d like to put this FB like button on a Page NOT on a Post.In which file (page.php? or another one?) I can insert PHP code so that the button appears in the content of my page dynamically?
Regards,
Mika 2000November 12, 2015 at 6:23 pm #534965Hey!
For a page then yes you would use the page.php template. Probably around line 33.
Or you could just drag our social share element to your page content in the layout builder.
Cheers!
Elliott- This reply was modified 9 years, 1 month ago by Elliott.
November 12, 2015 at 6:52 pm #535009Elliot,
I don’t find your social share element in the layout builder.
In content elements, I have :
text block, horizontal ruler, special header, box with icon list with icons, icon, slider items, button, notification, tabs, accordion, promotion box, articles, contact forms, picture, portfolio grid, fullwidth Masonry, team Member, slider articles, progress bars, testimonies, widegt area comment.Otherwise, how to implements the Facebook share button in a sidebar ?
Thanks again for your help ;)
Mika 2000November 12, 2015 at 6:58 pm #535019Hi!
It should be called “Social Share Buttons” and you can find it in the “Content Elements” tab of the layout builder. If you do not see it then you probably need to update Enfold.
To use it in a widget you can copy the shortcode for it in a text widget. To get the shortcode switch to the default editor and click on the “Magic Wand Icon” in the toolbar to insert it in the editor.
Regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.