Support

Account

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.