Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1226787
    keciaham
    Participant

    I 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.

    #1226984
    Rue Nel
    Moderator

    Hello 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.

    #1227240
    keciaham
    Participant

    That worked perfectly. Thanks!

    #1227262
    Thai
    Moderator

    Glad it worked 🙂

    If you need anything else please let us now.

  • <script> jQuery(function($){ $("#no-reply-1226787 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>