Forums

[Plugin: Simple Tags] Theme IMPLEMANTATION (3 posts)

  1. binbin
    Member
    Posted 5 months ago #

    Hello;

    I would like to put my post tags as meta keywords in my post page (for home page I used a traditionnal meta keywords)

    So in my header.php I have this :

    <?php if ( is_home() ) { ?>
        <meta name="keywords" content="mes mots clés" /> 
    
    <?php } else if ( is_single() ) { ?>
    <meta name="keywords" content="<?php st_meta_keywords(); ?>" />

    But when I type this code, I have as meta keywords the comment of st_get_meta_keywords function :

    '<!-- Generated by Simple Tags ' . $simple_tags->version . ' - http://wordpress.org/extend/plugins/simple-tags -->'

    My question is : What is the correct code to type to have my tags as met keywords ?

    thanks

  2. binbin
    Member
    Posted 5 months ago #

    Anyone got an idea ?
    thanks

  3. lucalucius
    Member
    Posted 4 months ago #

    Try this

    <?php if ( is_home() ) { ?>
    <meta name="keywords" content="mes mots clés" />
    <?php } else if ( is_single() ) { ?>
    <?php st_meta_keywords(); ?>
    <?php } ?>

    The function st_meta_keywords(); add automatically the HTML Code of Meta Keywords.

    Regards

Reply

You must log in to post.

About this Topic