Home › Forums › Weaver X Tutorials and Hints › Add Facebook Share Button
- This topic has 2 replies, 3 voices, and was last updated 5 years, 1 month ago by
Weaver.
-
AuthorPosts
-
November 1, 2018 at 16:39 UTC - Views: 19 #57090
Bburns
ParticipantI created Facebook Share code on Facebook for developers. I copied header.php to my Weaver Child Theme. Do I have to add a <body> tag to header.php in order to add the code snippet from Facebook?
November 1, 2018 at 17:14 UTC - Views: 26 #57091scrambler
Moderatorbefore going any further, a few questions.
Is the code to display a share button, if not what does the code do exactly?
What code are we speaking about, HTML and JavaScript, or PHP?
HTML and Scripts can be inserted in any content area, so the only question there would be where exactly do you want to see the output?PHP can also be inserted in content areas either if you have the “plus” plugin with its [PHP] shortcode, or with a PHP insertion plugin. That would be a lot easier than using a child theme.
November 1, 2018 at 17:15 UTC - Views: 42 #57092Weaver
KeymasterThis sounds like the hard way to do this.
First, there should be plenty of easy to use plugins to let you add a facebook share.
If they just gave you a JavaScript clip, you can also simply add it directly to a Weaver Xtreme setting without the need for a Child Theme. (Customize -> Add Content (HTML Areas) -> Site <HEAD> Section -> <HEAD> Section Content)
If you had to ask about adding a <body> tag, then you probably don’t have the experience to even be modifying the header.php file anyway. And Weaver’s is fairly complex code to look at. But you would never need to add a <body> tag to any child theme for any theme. If their directions say that, they are uninformed. But header.php is responsible for the <head> section, and <body> is generated elsewhere.
-
AuthorPosts
- You must be logged in to reply to this topic.