ThemeShaper Forums » Thematic

[closed]

How do I add meta title and description tags to this theme ?

(3 posts)
  • Started 13 years ago by stevesideas
  • Latest reply from Duke
  • This topic is not resolved
  1. Hi guys,

    First post and probably a dead giveaway that Im a real beginner when it comes to anything web. Apologies in advance !

    I have installed the gallery child theme and wish to have a title and description for my main page but cant seem to find a way to edit this. I read something about H1 title and can find this in the functions.php but not sure what to do with it.

    Ive also tried using this information:

    http://anime2.kokidokom.net/6-useful-thematic-snippets/

    Scroll down to: Adding meta to <head> but with no luck.

    Any help is really appreciated.

    Thanks

    Steve

    Posted 13 years ago #
  2. Could you please tell me if you need to add an on-page title (<h1>) or meta title and description (<title>, <meta name="description" />)?

    Posted 13 years ago #
  3. This is an old post but I will write a short response for any future readers who might encounter the same problem.

    To setup keyword and description meta in the Thematic template, simply add the following code into your child theme functions.php. And don't forget to insert your keywords! ;)

    function child_meta_keywords($description) {
    if(is_front_page())
    {
    $keywords_meta = "\t" . '<meta name="keywords" content="Your keywords go here!" />' . "\n\n";
    $description_meta = "\t" . '<meta name="description" content="Your description goes here!" />' . "\n\n";
    $child_meta = $description . $keywords_meta . $description_meta;
    return $child_meta;
    }
    return $description;
    }
    add_filter ('thematic_create_description','child_meta_keywords');

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.