Progenitor-Theme / progenitor

MIT License
7 stars 2 forks source link

Meta description tag #21

Open danielmrey opened 6 years ago

danielmrey commented 6 years ago

Hi Simon:

How could we add the Meta description tag?

  <meta name="description" content="<?php if ( is_single() ) {
      single_post_title('', true); 
    } else {
      bloginfo('name'); echo " - "; bloginfo('description');
    }
  ?>" />
SimonPadbury commented 6 years ago

https://github.com/Progenitor-Theme/progenitor/blob/master/functions/hooks/build-hooks-base.php

Inside progenitor_build_html_head()

But the title tag is populated from something in setup.php. If you don't like that thing in setup.php then you can instead get the <title> code from b4st but put it in progenitor_build_html_head() too.

danielmrey commented 6 years ago

I'd like to leave "add_theme_support('title-tag')" in setup.php as this is a Wordpress way of adding title, pity that they do not have same for description.

Meta Description code added in: "build-hooks-base.php" in "progenitor_build_html_head()"

Thanks