Tagged: avia, avia framework, avia layout builder, post
-
AuthorPosts
-
November 17, 2014 at 3:47 pm #352471
Hello,
in this subject (https://kriesi.at/support/topic/avia-layout-builder-doesnt-exist-on-posts/) we asked how to use Avia Layout builder on post and it worked but now we have another issue
A post edited without Avia Layout builder displays Title Authors share buttons comments
But a post edited with Avia Layout builder doesn’t.
We found with firebug that the post edited with Avia Layout builder is shown as a page
<main class="template-page
instead of<main class="content
in a standard postCan we fix this in the code or somewhere ? because our posts with Avia builder are still posts and we want to show author date share buttons and comments
Thanks a lot for your answer
Jeremy- This topic was modified 10 years ago by lacannecycongres. Reason: separate images
November 18, 2014 at 2:19 pm #352957Hey lacannecycongres!
Thank you for using Enfold.
I’m sorry but we don’t recommend the use of the advance layout builder for posts because of the issues like the one you stated above. You need to manually add all the information that a default post may have such as meta informations etc. However, you can add the sharing section with this on functions.php
add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { if(is_single()) { $content .= '<div style="height:1px; margin-top:20px;" class="hr"></div>'; $content .= avia_social_share_links(array(), false); } return $content; }
Again, we may not be able to provide support for issues that may arise when using the advance layout builder for posts.
Cheers!
IsmaelNovember 18, 2014 at 3:17 pm #352990Hello
Thanks for your answer
It works for the sharing section. To be clear I have to do some similar functions to add the “header” section (with author name, date, picture etc…), related content and comment section.
We bought the theme because it included a layout builder but we didn’t know that it was not recommended for posts !
The website is mainly filled with posts and the authors don’t know anything about shortcodes or html (I’m the only one good enough for that)Can you tell me which php file in the theme is called for single post using Avia ? Because single.php includes the “missing” sections
Or do you have functions like the one you gave me for the other “missing” sections ?
Thanks
Jeremy
November 19, 2014 at 1:01 pm #353597Hi!
You can still use the shortcode wand instead of the advance layout builder. I’m sorry but the meta information like get_the_time or author needs to be included on the loop but the advance layout builder uses the template-builder.php file which only compiles the shortcodes and use it as the content. Like I said, if you enable the advance layout builder for post, you have to manually add all the content of the post like page or portfolio items.
Best regards,
IsmaelDecember 12, 2014 at 4:53 pm #367307This reply has been marked as private.December 15, 2014 at 5:28 am #368144Hey!
Use the get_the_post_thumbnail function. Refer to this link: http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail
Best regards,
IsmaelDecember 15, 2014 at 4:06 pm #368320Thanks for the answer, works perfectly now.
-
AuthorPosts
- The topic ‘Header/Share/related/comments on post with Avia Layout builder’ is closed to new replies.