Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1103852
    Nuera
    Participant

    I am using Renew stack and we would like to include a subtitle on a single blog post.

    Is that possible?

    #1103861
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1103993
    Nuera
    Participant

    No problem! We’re at http://nueramarketing.com

    Thank you!

    #1104206
    Darshana
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup 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.

    Then copy the file _content-post-header.php which is loacated under “x/framework/views/renew/” into your child theme’s respective location “x-child/framework/views/renew/”. Then open the file using a text editor and replace the following code.

    
    <?php
    
    // =============================================================================
    // VIEWS/RENEW/_CONTENT-POST-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Standard <header> output for various posts.
    // =============================================================================
    
    ?>
    
    <header class="entry-header">
      <?php if ( is_single() ) : ?>
      <h1 class="entry-title"><?php the_title(); ?></h1>
      <h5>Your Sub Heading</h5>
      <?php else : ?>
      <h2 class="entry-title">
        <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a>
      </h2>
      <?php endif; ?>
      <?php x_renew_entry_meta(); ?>
    </header>
    

    From the above code, locate the following line which renders your sub heading.
    <h5>Your Sub Heading</h5>

    You can setup a custom field using our ACF Pro guide here (https://community.theme.co/kb/integrated-plugins-acf-pro/) and then display a dynamic sub title if needed.

    Hope that helps.

    #1104494
    Nuera
    Participant

    Ok, I’m having three problems:

    1) The field is showing on every post, even though I have it set to only appear on the specific post I’m trying to add the subheading to.

    2) I don’t know what to enter into the <h5>heading on the content-post-header line to call on the ACF custom field. As of right now the site is just displaying whatever text I add there.

    3) There is a large gap above the subtitle. I’d like it to sit flush beneath the title, if possible.

    Thank you!

    #1104828
    Lely
    Moderator

    Hi There,

    1.) How did you filter for specific post?
    For example, we want this subheading to display on this post only:http://nueramarketing.com/how-to-disagree-with-a-client/
    Please update this line:
    <h5>Your Sub Heading</h5>
    To this:

    <?php if(is_single('1436')){ ?>
    <h5>Your Sub Heading</h5>
    <?php }?>

    1436 is your single post ID.

    2.) Check this link on how to implement ACF:https://community.theme.co/kb/integrated-plugins-acf-pro/
    Something like this will work:
    <h5><?php the_field('about_author'); ?></h5>
    Change about_author to your own Custom Field name.

    3.)Add class mtn. See this:https://community.theme.co/kb/css-class-index/
    The code will be updated to this:
    <h5 class="mtn"><?php the_field('about_author'); ?></h5>

    Hope this helps.

    #1105018
    Nuera
    Participant

    Wow… that seems to have done it!

    You guys are amazing. Best support I’ve ever seen… Brava!

    #1105173
    Friech
    Moderator

    We’re delighted to assist you with this.

    Cheers!

    #1218801
    suzannereid
    Participant

    Is it possible to have this show on the blog feed as well?
    Rachelehphotography.com

    #1218891
    Rupok
    Member

    Hi @suzannereid

    Do you want a subtitle ob blog page or something else? Kindly clarify what you are trying to achieve.

    Thanks!

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