• Resolved CarolineElisa

    (@carolineelisa)


    Hi there,

    I am successfully using the following in my singular page template to display a post ‘Subtitle’:

    <?php while ( have_posts() ) : the_post(); ?>
    <article id="post-<?php the_ID(); ?>">
                 <?php the_title('<h2>', '</h2>'); ?>
                 <?php echo the_secondary_content( 'Subtitle' ); ?>
                 <p><?php the_content("Continue reading " . the_title('', '', false)); ?></p>           </article>
            <?php endwhile; ?>

    However, on my archives template the following does not work:

    <?php while ( have_posts() ) : the_post(); ?>
    <article id="post-<?php the_ID(); ?>" class="four columns">
    	<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    	<?php get_the_image( array( 'link_to_post' => false, 'size' => 'medium', 'image_class' => 'projectthumb', 'image_scan' => 'true' ) ); ?>
    	<?php the_title('<h3>', '</h3>'); ?>
    	<?php echo the_secondary_content( 'Subtitle' ); ?></a>
    </article>
    <?php endwhile; ?>

    What am I missing?

    Thanks!

    http://wordpress.org/extend/plugins/secondary-html-content/

Viewing 1 replies (of 1 total)
  • Thread Starter CarolineElisa

    (@carolineelisa)

    Ok, got it working with this:

    <?php echo the_secondary_content( 'Homepage subtitle', get_the_ID() ); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Secondary HTML Content] Secondary content within template not showing on archive page’ is closed to new replies.