php - How to make $_GET function work with Rewritten url? -
i tried using
$_get['glossary']
function in wordpress functions.php hide path of specific post following domain
https://sampledomain.com?glossary=extrathing
here full code of this
if ($_get['glossary']){ printf('<style>.author-box{display:none;}</style>'); }
it worked perfect , hide author-box specific post.
however when did activated permalink in wordpress changed url to
https://sampledomain.com/glossary/extrathing/
the above function of $_get no more working, suggestion on please ?
you can change if condition check uri
if ($_get['glossary'] || $_server['request_uri'] == '/glossary/extrathing/'){ printf('<style>.author-box{display:none;}</style>'); }
Comments
Post a Comment