• Resolved Erick Toma

    (@relozo)


    Hi all,

    I am wondering if there’s a snippet available to detect if a page’s SEO title is empty?

    Something like

    if(Yoast_SEO_Title_is_Empty)
            <?php if(wp_title('', false)) { echo ' :'; } ?>
            <?php bloginfo('name'); ?>
Viewing 1 replies (of 1 total)
  • Thread Starter Erick Toma

    (@relozo)

    Ah found the easy solution which was already built-in.

    <?php wp_title(''); ?>

    Basically if you leave the SEO Title Blank, It will pull from the SEO title located in Search Appearance – Yoast SEO

Viewing 1 replies (of 1 total)
  • The topic ‘Set default value for title tag if SEO title is empty’ is closed to new replies.