We're merging with GenerateBlocks! Learn more here.

[Support request] Change Title

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Change Title

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2887
    Todd
    Participant

    Great plugin, really enjoying using this in tandem with GeneratePress.

    Would there be an easy way to change the title of pages or posts when they appear as a unit with WPSP? Like could I bring in a custom field to change the title?

    So for example on the page below the title of the one of the WP Show Posts is ”Financing” and I would want to change the title of the page when it appears in the blocks to“Financing Options”

    Home Page

    Todd

    #2906
    Tom
    Keymaster

    Hi Todd,

    Hmm, my first thought would be to filter the title with a function, but I’m not sure it would work as that post isn’t the main query on the page.

    Perhaps it would be better to name the page Financing Options, then adjust it on the single post to only say Financing?

    #2913
    Todd
    Participant

    I am not sure I am following you on adjusting it on the single post to only say Financing? WPSP only picks up the title, right?

    #2954
    Todd
    Participant

    Just checking in on this, I have a site going live soon and have been trying ot figure this out. Thank you.

    #2967
    Tom
    Keymaster

    For example, name the page: Financing Options

    Be sure to change the permalink to financing-options as well.

    Then add a function to change the title on the single page:

    add_filter( 'the_title', 'tu_alter_title' );
    function tu_alter_title( $title ) {
        if ( is_page( 'financing-options' ) ) {
            return 'Financing';
        }
    
        return $title;
    }
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.