Tagged: x
-
AuthorPosts
-
October 22, 2016 at 6:49 pm #1226787
keciahamParticipantI am using Renew, and I would like to add a line of text just beneath the post info (date, categories, comments). I want to set it up so that the text is automatically there on all posts, but only when a single post is viewed. I do not want the added text to show on the blog index page.
October 23, 2016 at 12:11 am #1226984
Rue NelModeratorHello There,
Thanks for writing in!
To resolve your issue, what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
After the child theme is set up, please add the following code in your child theme’s functions.php file
// Custom content text // ============================================================================= function add_content_text(){ ?> <?php if ( is_single() ) : ?> <div class="custom-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer scelerisque eros eu pulvinar dictum. Nunc egestas massa at elit bibendum, cursus fringilla nunc faucibus. Proin dignissim efficitur nunc a cursus. </p> </div> <?php endif; ?> <?php } add_action('x_after_view_renew__content-post-header', 'add_content_text'); // =============================================================================Please let us know if this works out for you.
October 23, 2016 at 7:44 am #1227240
keciahamParticipantThat worked perfectly. Thanks!
October 23, 2016 at 8:37 am #1227262
ThaiModeratorGlad it worked 🙂
If you need anything else please let us now.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1226787 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
