Updated on May 24, 2017
In the comments section of How to display CPT archive headline/intro inside the page header in Showcase Pro article a user asked:
Hi Sridhar, Is it possible to do something similar to this with all the pages? Instead of showing the page title, you can add a custom headline and sub-headline? The same as the home page.
In Showcase Pro, title appears inside the Page Header on Pages like this (when the Page has a featured image):
We can add two custom fields called say Page Headline and Page Subheading using ACF plugin, attach these to Pages and when these are filled,
display them on the frontend.
We shall set this up such that if the headline is left empty, the standard Page title will appear in its place like before. Subheading is optional as well. If present, it will appear beneath the title/headline.
Tested in Showcase Pro v2.0.0
Install and active Advanced Custom Fields.
Import this field group or manually add a field group named say,
Page Meta having the two text fields.
Edit your Page(s), populate the two custom fields and update.
In functions.php replace
$title = the_title( '<h1>', '</h1>', false );
To view the full content, please sign up for the membership.
Already a member? Log in below or here.