WordPress.org

Ready to get started?Download WordPress

Forums

Yoast SEO plugin template tag (1 post)

  1. andytford
    Member
    Posted 3 years ago #

    My theme does not utilize a 'homepage' per se, rather it is dynamically created on the admin side and via sidebars. In utilizing the SEO plugin, the meta descriptions are appearing for every page with exception to the homepage.

    What syntax would be required to have a default meta description, that I would place within the header to be used on the homepage and otherwise refer to the Yoast SEO plugin if on another page?

    My coding skills are somewhat limited, but I would imagine it might need to resemble something like this?

    <meta name='description' content="<?php if (is_home()) { bloginfo('description'); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php <strong>USE YOAST SEO PLUGIN</strong>(''); ?> "/>

    Live site reference: http://reward-programs.rewardtrax.com/

Topic Closed

This topic has been closed to new replies.

About this Topic