<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page? &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/feed/</link>
		<description></description>
		<lastBuildDate>Wed, 05 Nov 2025 02:18:12 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277583</guid>
					<title><![CDATA[Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277583</link>
					<pubDate>Wed, 20 May 2015 09:03:21 +0000</pubDate>
					<dc:creator>t3wy_foundation</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,<br />
First, I am kind of new to WordPress (learning fast, though)</p>
<p>What I would like to do is have a Facebook &#8220;like&#8221; (and/or &#8220;share&#8221; button at the bottom of every page on my website, so people can like or share that particular website page.<br />
I don&#8217;t want to use the Facebook plugin for WordPress.<br />
I did manage to place a like button  in my sidebar (so people can like our Facebook page), but how to go about it to have the same result on every page (always!) without using the plugin?</p>
<p>I use theme X &#8220;Renew&#8221; on my website <a href="http://www.t3wy.org" rel="nofollow">http://www.t3wy.org</a></p>
<p>Thanks in advance!<br />
Marcel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277640</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277640</link>
					<pubDate>Wed, 20 May 2015 10:49:04 +0000</pubDate>
					<dc:creator>Christopher</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Because this requires a template change, I&#8217;d advise that you setup a <a href="http://theme.co/x/member/kb/how-to-setup-child-themes/" title="Child Themes" target="_blank" rel="nofollow">child theme</a>. This allows you to make code changes that won&#8217;t be overwritten when an <strong>X</strong> update is released. After your child theme is setup, please review how we recommend making template changes in <a href="http://theme.co/x/member/kb/customization-best-practices/" rel="nofollow">Customization Best Practices</a>.</p>
<p>Copy <strong>_content-post-footer.php</strong> file from <strong> framework -&gt; views -&gt; renew</strong> and put it in the same path inside child theme, Now replace existing code with this:</p>
<pre><code>&lt;?php

// =============================================================================
// VIEWS/RENEW/_CONTENT-POST-FOOTER.PHP
// -----------------------------------------------------------------------------
// Standard &lt;footer&gt; output for various posts.
// =============================================================================

?&gt;
&lt;div class=&quot;x-container max width offset&quot;&gt;
&lt;?php echo do_shortcode(&#039;[share title=&quot;Share this Post&quot; facebook=&quot;true&quot;]&#039;); ?&gt;
&lt;/div&gt;
&lt;?php if ( has_tag() ) : ?&gt;
  &lt;footer class=&quot;entry-footer cf&quot;&gt;
    &lt;?php echo get_the_tag_list( &#039;&lt;p&gt;&lt;i class=&quot;x-icon-tags&quot;&gt;&lt;/i&gt; Tags: &#039;, &#039;, &#039;, &#039;&lt;/p&gt;&#039; ); ?&gt;
  &lt;/footer&gt;
&lt;?php endif; ?&gt;</code></pre>
<p>X doesn&#8217;t provide shortcode for facebook like, if you need that as well please use 3rd party plugin.</p>
<p>Hope it helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277765</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277765</link>
					<pubDate>Wed, 20 May 2015 13:33:48 +0000</pubDate>
					<dc:creator>t3wy_foundation</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks,<br />
I will stick with Facebook plugin for the moment, until I am more at ease with repealing code and making child themes 🙂</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277863</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-277863</link>
					<pubDate>Wed, 20 May 2015 15:53:45 +0000</pubDate>
					<dc:creator>Darshana</dc:creator>

					<description>
						<![CDATA[
						<p>Sure, you&#8217;re welcome :). Also let us know if you need any further assistance. </p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-287491</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-287491</link>
					<pubDate>Sun, 31 May 2015 09:28:29 +0000</pubDate>
					<dc:creator>t3wy_foundation</dc:creator>

					<description>
						<![CDATA[
						<p>So, I installed a child theme after all 🙂</p>
<p>Somewhere in this forum I found that a way to load Facebook&#8217;s SDK; I had to add this to the X-theme&#8217;s child functions.php:</p>
<p><em>add_action( &#8216;x_before_site_begin&#8217;, &#8216;x_print_fb_sdk&#8217; );<br />
function x_print_fb_sdk(){<br />
	?&gt;<br />
	&lt;div id=&#8221;fb-root&#8221;&gt;&lt;/div&gt;<br />
	&lt;script&gt;(function(d, s, id) {<br />
	  var js, fjs = d.getElementsByTagName(s)[0];<br />
	  if (d.getElementById(id)) return;<br />
	  js = d.createElement(s); js.id = id;<br />
	  js.src = &#8220;//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;appId=your_FB_ID&amp;version=v2.3&#8221;;<br />
	  fjs.parentNode.insertBefore(js, fjs);<br />
	}(document, &#8216;script&#8217;, &#8216;facebook-jssdk&#8217;));&lt;/script&gt;<br />
	&lt;?php<br />
}</em></p>
<p>Now, if I add facebook&#8217;s code for the share and like button manually to every page, things work perfectly. However: that would mean a lot of (extra) work.</p>
<p>Obviuosly, for a different website, using a different theme, I had the same challenge to solve.</p>
<p>They came up with this solution to add to their Child&#8217;s functions.php which automatically added the desired like and share buttons to the pages:</p>
<p> <em>add_filter( &#8216;the_content&#8217;, &#8216;kt_facebook_code_after_content&#8217; ); </p>
<p> function kt_facebook_code_after_content( $content ) { </p>
<p> 		$facebookcode = &#8216;&lt;div class=&#8221;fb-like&#8221; data-width=&#8221;400&#8243; data-layout=&#8221;standard&#8221; data-action=&#8221;like&#8221; data-show-faces=&#8221;true&#8221; data-share=&#8221;true&#8221;&gt; &lt;/div&gt;&#8217;;</p>
<p>        $content = $content . $facebookcode;</p>
<p>    return $content;<br />
}</em></p>
<p>I was wondering if a similar solution would work for X theme as well and if so, what would be the code?</p>
<p>Thanks in advance!</p>
<p>Marcel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-287745</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-287745</link>
					<pubDate>Sun, 31 May 2015 17:28:41 +0000</pubDate>
					<dc:creator>Thai</dc:creator>

					<description>
						<![CDATA[
						<p>Hi There,<br />
You can use that code, but need to revise a bit:</p>
<pre><code>add_filter( &quot;the_content&quot;, &quot;x_facebook_code_after_content&quot; );
function x_facebook_code_after_content( $content ) {
  global $post;
  $like = &#039; &lt;div class=&quot;fb-like&quot; data-href=&quot;&#039;.get_permalink( $post-&gt;ID ).&#039;&quot; data-layout=&quot;standard&quot; data-action=&quot;like&quot; data-show-faces=&quot;true&quot; data-share=&quot;true&quot;&gt;&lt;/div&gt;&#039;;
  $share = &#039; &lt;div class=&quot;fb-share-button&quot; data-href=&quot;&#039;.get_permalink( $post-&gt;ID ).&#039;&quot; data-layout=&quot;button_count&quot;&gt;&lt;/div&gt;&#039;;

  $content = $content . $like . $share;
  return $content;
}</code></pre>
<p>For more information about Facebook Like / Share buttons, please take a look at these links:<br />
<a href="https://developers.facebook.com/docs/plugins/like-button" rel="nofollow">https://developers.facebook.com/docs/plugins/like-button</a><br />
<a href="https://developers.facebook.com/docs/plugins/share-button" rel="nofollow">https://developers.facebook.com/docs/plugins/share-button</a></p>
<p>Hope this helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-288279</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-288279</link>
					<pubDate>Mon, 01 Jun 2015 07:13:18 +0000</pubDate>
					<dc:creator>t3wy_foundation</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks a lot!<br />
Will try it later on and get back to you with the results!</p>
<p>Best,<br />
Marcel</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-288301</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-288301</link>
					<pubDate>Mon, 01 Jun 2015 07:34:11 +0000</pubDate>
					<dc:creator>t3wy_foundation</dc:creator>

					<description>
						<![CDATA[
						<p>Worked like a charm!</p>
<p>Thanks a lot!</p>
<p>Now I&#8217;m about ready to go &#8220;live&#8221;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-288441</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-288441</link>
					<pubDate>Mon, 01 Jun 2015 10:30:29 +0000</pubDate>
					<dc:creator>Thai</dc:creator>

					<description>
						<![CDATA[
						<p>You&#8217;re most welcome.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-291180</guid>
					<title><![CDATA[Reply To: Facebook &quot;Like&quot; and/or &quot;share&quot; button on every page?]]></title>
					<link>https://theme.co/archive/forums/topic/facebook-like-andor-share-button-on-every-page/#post-291180</link>
					<pubDate>Wed, 03 Jun 2015 16:53:57 +0000</pubDate>
					<dc:creator>rsmith4321</dc:creator>

					<description>
						<![CDATA[
						<p>I must be missing something, in the code you provided for the functions.php I can&#8217;t see where the Facebook sdk is being loaded.  Also, I would like to place the like button only on blog posts above the content and below the post title if possible.  Thanks.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

