Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #371101

    Hello,

    One of the default blog post that came with the theme has “Share Links” on the bottom of the post. I went to Enfold-Child -> Blog Layout and disabled a few of these share links (only displaying Facebook, Twitter and Google+). But when I created a new blog post and published it, I noticed it did not have the “Share Links” on the bottom of the post.

    Am I looking at the wrong places? Any advice is greatly appreciated!

    #371103

    Hi!

    This may be happening because you’ve activated ALB on Posts, add this to functions.php to force it to show on template builder posts;

    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    function avia_add_social_toolbar_template_builder($content = "")
    {
    	$content .= avia_social_share_links(array(), false);
    	$content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>';
    	return $content;
    }

    Regards,
    Josue

    #371113

    Awesome, that did the trick!! Is there a code to get the comments there as well?

    *Edit* It’s actually showing on every page as well, is there a way to only display it on blog post? If not, it’s no big deal, I can live without it!

    • This reply was modified 10 years ago by stewroids.
    #371142

    Hey!

    Use this instead:

    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    function avia_add_social_toolbar_template_builder($content = "")
    {
    	if(is_singular('post'))
    	$content .= avia_social_share_links(array(), false);
    	$content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>';
    	return $content;
    }

    Regarding comments you’d need to use the Comments element from ALB (Content Elements).

    Cheers!
    Josue

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