Simple Tagging: More Template Tags
Meta Keywords
The template tag <?php STP_MetaKeywords(); ?>
outputs the list of meta keywords for the current view. Use this within your site’s header.
Note that in the plugin’s options is an option to add meta keywords automatically, however this does not work with every theme.
STP_GetMetaKeywords()
is the non-echoing version (returns a string).
Options
STP_MetaKeywords($before, $after, $separator, $include_cats)
- $before:
A string to display before each keyword/tag. Default: empty string (''
). - $after:
A string to display after each keyword/tag. Default: empty string (''
). - $separator:
A string used as separator between each keyword/tag. Default:','
. - $include_cats:
Include also categories.default
– includes all categories on the homepage, and only categories for posts in the current view for all other pages.all
– includes all categories in every view.none
– never includes categories in the meta keywords.
Current Tag Set
The template tag <?php STP_CurrentTagSet(); ?>
outputs the tags used in a tag search, that means it displays the current tags when a visitor is browsing tags.
This can be useful in your pagetemplate.simpletagging.php
page, for example:
<h2>All results for "<?php STP_CurrentTagSet(); ?>"</h2>
STP_GetCurrentTagSet()
is the non-echoing version (returns a string).
Options
STP_CurrentTagSet($separator)
$separator: string to be to separate the tags. Default: ', '
Is Tag View ?
The template tag STP_IsTagView()
can be used to determine if the current view will be returning tag search results. It returns TRUE if a tag search was requested (that means that a visitor is browsing tags), FALSE otherwise.