- This topic has 3 replies, 2 voices, and was last updated 7 years, 1 month ago by Andrew Misplon.
Tagged: subtitle
- AuthorPosts
- November 15, 2017 at 8:25 pm #8284
eri-catParticipantWondering if I could get some assistance with adding a subtitle to pages and posts? I have tried a few plugins but I don’t think the theme is built for subtitles. (I am hoping it can appear under the page title, above the featured image.) Thanks!
November 15, 2017 at 8:28 pm #8285
Andrew MisplonKeymasterHi eri-cat
Sure. How would you enter the sub-title? Where would that information be stored? You could perhaps install Advanced Custom Fields and setup a custom field that way. It would then require a child theme to render the field on the site front end.
November 15, 2017 at 11:23 pm #8288
eri-catParticipantOk, I’ve downloaded the ACF plugin and I’ve started my child theme folder (I wasn’t using one before, only had been editing CSS) with a style.css and functions.php file.
ACF
Field Label: subtitle
Field Name: subtitleCan you help explain which file(s) I will need to create in my child theme to display this field?
Also, have I enqueued the parent styles correctly? New to this!
<?php add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); function enqueue_parent_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'//puro-4401.kxcdn.com/style.css' ); } ?>
November 16, 2017 at 11:44 am #8294
Andrew MisplonKeymasterHi 🙂
Please, see my example: https://purothemes.com/wp-content/uploads/2017/11/ultra-child-acf-single-post-sub-title.zip.
I only saw your field naming after this so just change
sub_title
in single.php in the child as required.Please, note that any changes you’ve made to the parent theme files will be lost if we release an update in the future and you run that update.
- AuthorPosts
You must be logged in to reply to this topic.