
-
AuthorPosts
-
September 21, 2015 at 1:07 pm #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,
September 21, 2015 at 3:22 pm #506477Hi Ewoud!
are you using Enfold theme? if yes you can use the code block element inside of ALB to implement it.
Cheers!
AndySeptember 21, 2015 at 3:27 pm #506480Thanks 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,
September 21, 2015 at 5:27 pm #506548Hi!
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,
ElliottSeptember 22, 2015 at 8:07 am #506811That 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; }
September 22, 2015 at 12:41 pm #506975Hi!
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 -
AuthorPosts
- You must be logged in to reply to this topic.