Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #506381

    Hi,

    I would like to include some custom code to the Title Container, for example:
    <div class=”social-like pull-left”><div class=”fb-like” data-layout=”button” data-action=”like” data-show-faces=”false” data-share=”false”></div></div>

    Thank you,

    #506477

    Hi Ewoud!

    are you using Enfold theme? if yes you can use the code block element inside of ALB to implement it.

    Cheers!
    Andy

    #506480

    Thanks Andy,

    Yes, we are using Enfold but that still sounds a bit like abracadabra to me.
    Could you provide me with the code?

    Thank you,

    #506548

    Hi!

    I think you will need to add it to line 330 in the functions-enfold.php file.

    			'html'			=> "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>",
    

    Or you could try adding it to the header as a widget area, http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/, and then use CSS to position it over the title bar.

    Regards,
    Elliott

    #506811

    That didn’t really work and using the widget method also didn’t give the right results.

    Your colleague gave me this code to insert the social share buttons inside the Title Container. Can we not adjust this code to implement custom code instead?

    /* Enable Social Share Buttons */
    add_filter('avf_title_args', 'avia_add_social_toolbar_template_builder', 10, 2);
    function avia_add_social_toolbar_template_builder($args, $id)
    {
    	ob_start();
    	avia_social_share_links(array(), false);
    	$social = ob_get_clean();
    	$args['additions'] .= $social;
    	return $args;
    }
    #506975

    Hi!

    Please try changing your code to following one

    add_filter('avf_title_args', 'avia_add_social_toolbar_template_builder', 10, 2);
    function avia_add_social_toolbar_template_builder($args, $id)
    {
    	ob_start();
    	avia_social_share_links(array(), false);
    	$output = '<div class="social-like pull-left"><div class="fb-like" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div></div>';
    	$args['additions'] .= $output;
    	return $args;
    }

    Best regards,
    Yigit

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