Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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 post

    Can 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, 1 month ago by lacannecycongres. Reason: separate images
    #352957

    Hey 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!
    Ismael

    #352990

    Hello

    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

    #353597

    Hi!

    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,
    Ismael

    #367307
    This reply has been marked as private.
    #368144

    Hey!

    Use the get_the_post_thumbnail function. Refer to this link: http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

    Best regards,
    Ismael

    #368320

    Thanks for the answer, works perfectly now.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Header/Share/related/comments on post with Avia Layout builder’ is closed to new replies.