Home › Forums › Support › Post and Page titles not showing › Reply To: Post and Page titles not showing
July 18, 2016 at 6:18 pm
#211064
Tom
Lead Developer
Lead Developer
In order for it to look good, you’ll need to apply CSS to it so it matches the rest of your page style.
You can add it with a function like this:
add_action( 'generate_before_main_content','generate_add_sections_title' );
function generate_add_sections_title()
{
global $post;
$use_sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_use_sections', TRUE) : '';
if ( ! $use_sections )
return;
if ( generate_show_title() ) : ?>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php endif;
}