Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1200956

    Hi,
    I’ve set the footer as custom page in Theme Options>Footer>Select Page & set it to an existing page which I’m using as footer. In general it works & the footer appears on all pages. But there is a problem that all the social sharing button URLs now point to: domainname.com/footer/&t=Footer instead of the actual page URL from where the button is clicked. What am I doing wrong?

    #1200990

    Hey tronicszone,
    The social share element automatically links to the post that it is on, but since you have added it to your footer which is a “page as footer” it will link to the footer page.
    If your footer was normal the social share would link to the page and not a post as designed.
    I recommend that you remove the footer social share.

    Best regards,
    Mike

    #1202146

    Thanks for your response. could you please let me know how I can add social sharing buttons in the footer? I cannot add the social buttons block to each page and post manually as it is a lot of pages & posts to update!

    #1202270

    Hi,
    To add the social share buttons to the bottom of each page you can use this function, try adding this code to the end of your functions.php file in Appearance > Editor:

    add_filter('avf_template_builder_content', 'avf_template_builder_content_mod', 10, 1);
      function avf_template_builder_content_mod($content = "")
      {
    	if(is_page() ) {
    	  $addendum = do_shortcode(" [av_social_share title='Share this entry' style='' buttons='custom' share_facebook='aviaTBshare_facebook' share_twitter='aviaTBshare_twitter' share_gplus='aviaTBshare_gplus' share_linkedin='aviaTBshare_linkedin' share_mail='aviaTBshare_mail' custom_class='' admin_preview_bg='' av_uid='av-670mc8'] ");
    	  $content = $content . $addendum ;
    	}
    	return $content;
      }

    This function will add the social share buttons shortcode to the bottom of each page built with the Advanced Layout Builder, after the builder content, but before the footer, so the social share buttons should use the page as the url.
    Please adjust the social share buttons shortcode to match your site, this code is just an example.
    If you change if(is_page() ) to if(is_page() && !is_front_page() && !is_home()) the social share buttons will show on every page except the homepage.

    Best regards,
    Mike

    #1202353

    Hi,
    Thanks for your response. I finally ended up using the default footer option and just added the social share short code to one of the footer columns. This works for me.

    #1202591

    Hi,

    Great, I’m glad that you found a solution and thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1287634

    I’m re-running this post, I have the same problem. I’m using a footer file for the footer where I put the shares on social networks
    I inserted the code you provided but it displays the share links in the page and in the footer.
    I would like these links to be only in the footer page. What would I have to change in the code to make it work?
    Thanks for your help.
    My site arianegrayhubert.com

    #1287652

    Hi,

    @poplin
    thank you for your question, I will try to help you here but as this is not your thread you will not see what we write in the Private Content area, and if you include login details to the Private Content area it will also be seen by the thread owner, so this is not recommended. I also see that you are using Enfold v4.7.6.4, and we are currently using v4.8.1

    I tested the above solution and it still works for v4.8, try adding this code to the end of your functions.php file in Appearance > Editor:

    	add_filter('avf_template_builder_content', 'avf_template_builder_content_mod', 10, 1);
    	function avf_template_builder_content_mod($content = "")
    	{
    	  if(is_page() ) {
    		$addendum = do_shortcode("[av_social_share title='Share this entry' buttons='' yelp_link='https://www.yelp.com' style='' alb_description='' id='' custom_class='' template_class='' element_template='' one_element_template='' av_uid='av-km64rgtq' sc_version='1.0' admin_preview_bg='']");
    		$content = $content . $addendum ;
    	  }
    	  return $content;
    	}

    This adds the social share buttons shortcode to the bottom of each page built with the Advanced Layout Builder, after the builder content, but before the footer, so the social share buttons will use the page as the url.
    Please use this and remove any social share buttons from your “Footer Page”.
    If you have trouble with this then please create a new thread and include a recap, and WordPress admin access in the Private Content area, of that thread (not this one).

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.