
-
AuthorPosts
-
June 3, 2015 at 5:44 pm #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,
June 4, 2015 at 11:59 am #454390Hey 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!
IsmaelJune 4, 2015 at 5:15 pm #454610Hi 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>
[/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?
June 5, 2015 at 7:06 am #454950 -
AuthorPosts
- You must be logged in to reply to this topic.