I have a Custom template with a custom query. I want to use additional information about the current taxonomy > description and name (and use it in the HEAD, desc, keywords, etc...)
<?php $productvariable = $_GET['product']; $term = get_term_by('slug', $productvariable, 'mytaxonomy'); $mytitle = $term->name; $mydesc = $term->description; ?>
- How do i make the variable safe from url to get_term_by ($value)?
- And what if there is no match is it possible to use ELSE?
- Is it possible to use the values inside HEAD (header.php)?
Is there a security issue when using a GET variable from url with get_term_by?