Tagged: x
-
AuthorPosts
-
July 26, 2016 at 12:22 pm #1103852
NueraParticipantI am using Renew stack and we would like to include a subtitle on a single blog post.
Is that possible?
July 26, 2016 at 12:26 pm #1103861
Nabeel AModeratorHi 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.
July 26, 2016 at 2:00 pm #1103993
NueraParticipantNo problem! We’re at http://nueramarketing.com
Thank you!
July 26, 2016 at 4:47 pm #1104206
DarshanaModeratorHi 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.
July 26, 2016 at 8:53 pm #1104494
NueraParticipantOk, 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!
July 27, 2016 at 4:19 am #1104828
LelyModeratorHi 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.
July 27, 2016 at 7:27 am #1105018
NueraParticipantWow… that seems to have done it!
You guys are amazing. Best support I’ve ever seen… Brava!
July 27, 2016 at 9:04 am #1105173
FriechModeratorWe’re delighted to assist you with this.
Cheers!
October 16, 2016 at 9:10 pm #1218801
suzannereidParticipantIs it possible to have this show on the blog feed as well?
Rachelehphotography.comOctober 16, 2016 at 11:24 pm #1218891
RupokMemberHi @suzannereid
Do you want a subtitle ob blog page or something else? Kindly clarify what you are trying to achieve.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1103852 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
