Support » Plugin: WP Subtitle » Subtitle not displaying despite editing the template file

  • Hello,

    Thanks for creating this plugin. I followed the instructions for editing the template page and edited my index.php (which is what seems to be the page that contains the code for my blog posts), however, the subtitles are NOT showing under the blog post title.

    Here is the code (you’ll notice I put your piece of code in the middle where it “stands out”)

    get_header(); ?>
    	<div id="primary" class="content-area">
    		<main id="main" class="site-main" role="main">
    		<?php if ( have_posts() ) : ?>
    			<?php /* Start the Loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    <?php the_subtitle( '<p class="subtitle">', '</p>' ); ?>
    				<?php get_template_part( 'content', get_post_format() ); ?>
    			<?php endwhile; ?>
    			the_posts_pagination( array(
    				'prev_text' => __( '&laquo; Previous', 'first' ),
    				'next_text' => __( 'Next &raquo;', 'first' ),
    			) );

    Is this the right piece of code to put – and am I editing the right file?

    Any help would be much appreciated!


    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Ben Huson


    The main content for each post in your code above is included via the <?php get_template_part( 'content', get_post_format() ); ?> code.

    You will need to edit the content.php and insert the subtitle code into that file below where the title is output.

Viewing 1 replies (of 1 total)
  • The topic ‘Subtitle not displaying despite editing the template file’ is closed to new replies.