ruchi ruchi - 1 month ago 4x
HTML Question

dynamic meta tag keywords in a dynamic page

I am working on a wordpress self-hosted website, with the standard .htaccess settings:

In the website, I have a page called "animalpage", as shown below:

I am using a custom page template and am processing some things, which include the use of GET variables. For instance:

if (isset($_GET=['word'])) { echo $_GET['word]; }


will display "cat".
I need help to be able to use the word "cat" in the meta keyword of this dynamic page?

Since the meta tags can only go in head section of the page but I am only fetching GET variable in body of the page. The problem I have is how to use keyword 'cat' in meta tag in

Does anyone know what I need to do so I am able to add the word "cat" (from GET parameter) in the meta tag of the dynamic page?


If I understand correctly, this is easy to impelement

<meta name="keywords" content="<?php if (isset($_GET=['word'])) { echo $_GET['word]; }  ?>" />

or another example is

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

which means you can add anything to Meta Tag dynamically.

Hope it works for you but if not please explain more, I will help to fix that.