-
AuthorPosts
-
January 19, 2015 at 10:58 am #381627
Hello All,
Anyone got any advice on how to add the social share back in to the blog / posts area once i have modified the system to allow for the advanced layout editor in blog?
thanks,
Kenn
January 19, 2015 at 11:03 am #381630Hi icuk!
Please refer to this post – http://kriesi.at/documentation/enfold/enable-social-share-section-for-pages/
Cheers!
YigitJanuary 19, 2015 at 2:36 pm #381751Hi Yigit,
If i was looking to implement:
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 .= ”;
return $content;
}With a conditional like if post type is standard , which outputs the following CSS: class=”single-format-standard” how would i code that up, it has been a while since i did conditionals in WP.
The reason for this, is that i want to target only blog posts, which obviously in changing to code to give it the layout edit, strips certain aspects away, so i need to identify only single blog posts, which will always be standard format. So need to know how i out the conditionals into the above function.
thanks for you direction.
January 19, 2015 at 3:04 pm #381785Hi Yigit,
I managed to stop being a lazy bugger and found another example you had somewhere with $context, so changed the statment in there to be:
add_filter(‘avf_template_builder_content’, ‘avia_add_social_toolbar_template_builder’, 10, 1);
function avia_add_social_toolbar_template_builder($content = “”)
{
if(has_category())$content .= avia_social_share_links(array(), false);
$content .= ”;
return $content;
}So that it picks up if the current post has a category assigned to it then publish the social share, now just to deal with a spacing issue.
January 19, 2015 at 3:05 pm #381788Hi!
Glad you figured it out!
Can you post the link to your website please so we can look into spacing issue?Regards,
YigitJanuary 19, 2015 at 3:13 pm #381794Hi Yigit,
No need for you guys to fix something that is basic CSS for me, or just some slight editing.
I modified the helper-social-media.php file and added:
$this->html .=”<div style=’clear:both;height:40px’> </div>'”;
on line 236 (well added a class to the div, as little inline styling as possible and all that jazz), it just needed a clearing div to bound the box out, as for some reason the footer was swallowing up the bottom half of the share pod, and i already had edited the file to re-order the social share icons anyway.
Cheers mate, can you mark this as closed.
January 19, 2015 at 3:16 pm #381799Hi Yigit,
Better way than that, just removed the negative 50px margin on the bottom of .av-share.box, well overwritten it custom.css and remvoed my div, keep the theme updatable.
-
AuthorPosts
- The topic ‘Advanced Layout Editor on Post – No Social Share’ is closed to new replies.