• Does anyone know what the function call is to retrieve the tag of the tag-page.php the user is viewing?

    Or should I strip the name of the php file to retrieve the tag name?

    I want to make the tag pages as generic as possible.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cogmios

    (@cogmios)

    In other words if the following function somehow somewhere exists already:

    $file = $_SERVER[“SCRIPT_NAME”];
    $break = Explode(‘/’, $file);
    $pfile = $break[count($break) – 1];
    $pfile = substr($pfile,4);
    $pfile = substr($pfile,0,strlen($pfile)-4);
    echo $pfile;

    Thread Starter cogmios

    (@cogmios)

    So… where I will use $tagdirectory = get_bloginfo(‘template_directory’) . ‘/include/tags’ . $tagname; to identify the directory where all the stuff specific to this tag will be stored.

    Or is there a better way?

    Thread Starter cogmios

    (@cogmios)

    ok … $tag_id = intval( get_query_var(‘tag_id’) ); gives me the current tag id…. now the only thing is to get the correct term that belongs to this id, that should be in there somewhere?

    Thread Starter cogmios

    (@cogmios)

    ah….. $tagname = get_query_var(‘tag’); …. DUH!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Tag of current Tag Page’ is closed to new replies.