GiangLe.DEV is using OceanWP This post contains affiliate links from OceanWP Theme

How to choose Page Title Style for Single Page – Post in OceanWP

There are some types of Page Title in OceanWP, you can choose from Default/ Centered/ Centered Minimal/ Hidden or Background Image styles.

You can set up Page Title Style in OceanWP by visit Customize > General Options > Page Title

This is what the title shown as choosing Default style

Default age Title in OceanWP

Personally, I prefer Background Image style over others. By choosing this option, you can pick an image as Title’s Background. My settings for this image are usually 135px – height, 0.4 – opacity, just like which appeared in top of this page.

How Set up Background Page Title in OceanWP

Set up Page Title for Single Page in OceanWP

How to set up title for Page in OceanWP

For single page, you can set up individual Page’s Title and Sub-Title by installing free Ocean Extra Plugin. These Title/ Sub-Title and Background Image will override default settings.

Set up Page’s Sub-Title on every single posts

In order to improve SEO…you can use this code snippet to set up Page’s Sub-Title on very sing posts

function my_alter_post_header_subheading( $subheading ) {
 
    if ( is_single() ) {
        $subheading = 'add your default subheading';
    }
 
    // Return the subheading
    return $subheading;
   
}
add_filter( 'ocean_post_subheading', 'my_alter_post_header_subheading' );
  • Change content of your Sub-Title on line 4
  • If you know PHP, you can set up Sub-Title based on Post’s custom field’s value, conditional display…

Read more:

GiangLe.DEV

My name is Giang, a Vietnamese guy living in Thanh Hoa City, Vietnam. I am a WordPress Developer, learning to master WordPress and Laravel PHP Framework.

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu