Home › Forums › General Issues › How to create Subtitle for each post with ACF › Reply To: How to create Subtitle for each post with ACF
Thanks for the details. If this does not work then you need to talk to the people that created the theme that your using to find out the correct way to modify templates and add content to them…
I did miss a php tag in my original code, try this
<?php the_title( '<h1 class="entry-title" ' . hybrid_get_attr( 'entry-title' ) . '>', '</h1>' ); ?>
<?php
if (get_field('subtitle')) {
?><h2><?php the_field('subtitle'); ?></h2><?php
}
?>
It would help if you use code tags for inserting code here, there’s a code button in the toolbar.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.