Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #453974

    Hello,

    I’ve been trying to figure out how to I can copy a Section from my frontpage(done with Advanced Layout Builder) to each and every post page (AFTER the comments section).

    Essentially I would like to copy the section just above the footer (Join our newsletter, etc..) from http://www.parentecoaching.com/

    to all the blog posts. Essentially changing the blog post template.

    I added the debug so I know the shortcode info.

    I think I’d have to edit single.php but have no idea what to do there.

    Any helo?

    thanks,

    #454390

    Hey parentecoaching!

    Thank you for using Enfold.

    You can edit the includes > loop-index.php file. Use the do_shortcode function: https://codex.wordpress.org/Function_Reference/do_shortcode

    If you don’t want to edit the file directly, you can use the ava_after_content action hook. Add something like this in the function.php file:

    add_filter('ava_after_content', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod() {
       if(is_singular('post')) {
    	    $output  = do_shortcode("[av_textblock size='' font_color='' color='']Click here to add your own text[/av_textblock]");
                echo $output;
       }  
    }

    Cheers!
    Ismael

    #454610

    Hi Ismael,
    thanks for the reply. The add_filter actually didn’t work… the Text get jumbled up with the logos under “Share this entry”…

    so I created a loop-index.php copy in /includes/ on my child theme and added

    echo do_shortcode(‘[av_one_third first]
    [av_textblock size=\'\' font_color=\'\' color=\'\']
    <h2 style=”text-align: center;”>Join our newsletter</h2>
    [/av_textblock]

    [av_codeblock wrapper_element=\'\' wrapper_element_attributes=\'\' deactivate_shortcode=\'aviaTBdeactivate_shortcode\' deactivate_wrapper=\'aviaTBdeactivate_wrapper\']
    <script type=”text/javascript” src=”http://app.getresponse.com/view_webform.js?wid=12082303&u=2Qqs”></script&gt;
    [/av_codeblock]
    [/av_one_third]‘ );

    right after the do_action(‘ava_after_content’, $the_id, ‘post’); on line 229.

    and it does the same thing as the add_filter, it puts it right in the middle of the Share this logos… Almost seems like a bug in the code.

    I would however want it below the comments.

    ideas?

    #454950

    Hey!

    Please give us a link to the actual post with the issue. Try to enclosed the shortcodes inside a container, a div tag. The share section has an offset position, maybe that’s why it covers the shortcodes.

    Best regards,
    Ismael

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