Tagged: x
-
AuthorPosts
-
August 29, 2016 at 4:02 am #1151387
flittrstParticipantHey there,
I’m currently looking for a way to add content unter posts. Till now I’ve added sign-up forms manually under every post but in the future I’m going to change my freebie.
And I’m pretty sure, this will happen several times in the future. Is there a plugin or any other way, to put content under every post? I dont want to edit every post I’ve ever created manually 🙂
Right now, I copy and paste X-Shortcodes at the end, f.e.: http://www.adsventure.de/instagram-business-profil-beitraege-bewerben/
Thanks 🙂
August 29, 2016 at 4:14 am #1151398
ChristianModeratorHey there,
X has a hook after the content. See https://community.theme.co/kb/customization/actions-and-filters-in-x/ for more details.
Here’s a usage example, please add the code below in your functions.php
// Add content after post add_action('x_before_the_content_end', 'content_after_single_post'); function content_after_single_post() { echo do_shortcode('[recent_posts count="2"]'); }Hope that helps. 🙂
August 30, 2016 at 8:51 am #1153359
flittrstParticipantHey Christian,
many thanks for your feedback. Just to be sure if this would be right. In my case I should add the following code in the functions php of my child theme (?):
// Add content after post add_action('x_before_the_content_end', 'content_after_single_post'); function content_after_single_post() { echo do_shortcode('[cs_content][cs_section bg_color="rgb(0, 163, 227)" parallax="false" style="margin: 0px 0px 25px;padding: 0px 0px 15px;"][cs_row inner_container="true" marginless_columns="false" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][x_custom_headline level="h3" looks_like="h3" accent="false" class="cs-ta-center" style="font-size: 1.5em;color: #fff;letter-spacing: 0.03em;"]HOL DIR JETZT MEINEN GRATIS TOOL-GUIDE INKLUSIVE:[/x_custom_headline][x_gap size="15px"][cs_icon_list][cs_icon_list_item title="11 kostenlose Social Media Advertising Tools für Facebook, Instagram & Twitter" type="check-circle" link_enabled="false" link_url="#" link_new_tab="false" style="color: #fff;"]11 kostenlose Social Media Advertising Tools für Facebook, Instagram & Twitter[/cs_icon_list_item][cs_icon_list_item title="Die besten Tipps regelmäßig per E-Mail" type="check-circle" link_enabled="false" link_url="#" link_new_tab="false" style="color: #fff;"]Die besten Tipps regelmäßig per E-Mail[/cs_icon_list_item][/cs_icon_list][cs_text][x_subscribe form="277"][/cs_text][/cs_column][/cs_row][/cs_section]'); }Would this work? 🙂
Thanks!
August 30, 2016 at 9:42 am #1153438
ChristianModeratorYes. Let us know how it goes. 🙂
August 30, 2016 at 10:09 am #1153495
flittrstParticipantWorks totally fine – many thanks 🙂
One last question: will this be added to the end of the rss feed? I guess that it isn’t added, right? 🙂
Thx!
August 30, 2016 at 10:19 am #1153511
RahulModeratorThat’s right!
Thanks
August 31, 2016 at 2:46 am #1154707
flittrstParticipantPerfect – but I need one last hack 🙂
Right now, this content also appears at the end of every page, not only at the end of blog posts.
I only want to add this at the end of my blog posts, for example here: http://www.adsventure.de/f-commerce-facebook-werbung-online-shops/
But right now its also on a regular page, for example here: http://www.adsventure.de/starte-hier/
How can I fix that? Many thanks 🙂
August 31, 2016 at 3:07 am #1154721
FriechModeratorHi There,
You can update your code to this:
// Add content after post add_action('x_before_the_content_end', 'content_after_single_post'); function content_after_single_post() { if ( is_single() ) { echo do_shortcode('[cs_content][cs_section bg_color="rgb(0, 163, 227)" parallax="false" style="margin: 0px 0px 25px;padding: 0px 0px 15px;"][cs_row inner_container="true" marginless_columns="false" style="margin: 0px auto;padding: 0px;"][cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"][x_custom_headline level="h3" looks_like="h3" accent="false" class="cs-ta-center" style="font-size: 1.5em;color: #fff;letter-spacing: 0.03em;"]HOL DIR JETZT MEINEN GRATIS TOOL-GUIDE INKLUSIVE:[/x_custom_headline][x_gap size="15px"][cs_icon_list][cs_icon_list_item title="11 kostenlose Social Media Advertising Tools für Facebook, Instagram & Twitter" type="check-circle" link_enabled="false" link_url="#" link_new_tab="false" style="color: #fff;"]11 kostenlose Social Media Advertising Tools für Facebook, Instagram & Twitter[/cs_icon_list_item][cs_icon_list_item title="Die besten Tipps regelmäßig per E-Mail" type="check-circle" link_enabled="false" link_url="#" link_new_tab="false" style="color: #fff;"]Die besten Tipps regelmäßig per E-Mail[/cs_icon_list_item][/cs_icon_list][cs_text][x_subscribe form="277"][/cs_text][/cs_column][/cs_row][/cs_section]'); } }Hope it helps, Cheers!
August 31, 2016 at 3:46 am #1154757
flittrstParticipantThanks! 🙂
August 31, 2016 at 5:16 am #1154843
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1151387 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
