Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta description tag #21

Open
danielmrey opened this issue Feb 20, 2018 · 2 comments
Open

Meta description tag #21

danielmrey opened this issue Feb 20, 2018 · 2 comments

Comments

@danielmrey
Copy link
Contributor

danielmrey commented Feb 20, 2018

Hi Simon:

How could we add the Meta description tag?

  • Something like this?
  <meta name="description" content="<?php if ( is_single() ) {
      single_post_title('', true); 
    } else {
      bloginfo('name'); echo " - "; bloginfo('description');
    }
  ?>" />
  • If so in which file you recommend I add this code?

  • Do you like this name: add_description_tag ()

@SimonPadbury
Copy link
Member

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants