Good morning,
I’m hoping someone can help me! I’m using a theme in Wordpress whose page template puts the name of the page (if it’s created in pages) or post in a large center block in the header. I’ve activated a plugin that automatically creates a page (within the plugin) but because it’s not created in pages the header isn’t pulling in the name of the page to fill the header. Is it possible to modify the page template to use a preset name if it can’t find a page title or post title?
Here’s the code for the header/title for each page:
<div class="title">
<h1 class="header-text"><?php if(get_post_meta( get_the_ID(), 'rnr_alt_title', true )){ echo get_post_meta( get_the_ID(), 'rnr_alt_title', true ); } else { the_title(); } ?></h1>
<?php if(get_post_meta( get_the_ID(), 'rnr_subtitle', true )){ ?>
<div class="subtitle">
<p><?php echo get_post_meta( get_the_ID(), 'rnr_subtitle', true ); ?></p>
</div><!-- END SUBTITLE -->
<?php } ?>
</div><!-- END TITLE -->