I need the URL to be placed in the header meta tags: <meta>KEYWORDS=" >http://example.com< "</meta>
Preferably on category pages.
How do I call the current url/permalink ie.. http://www.example.com/category?
What function/variable is used to show the CURRENT url?
This should be fairly easy but has eluded many WordPress users and webmasters.
Is there any WordPress GURUS that know the answer?
How about:
<?php
if( is_category() {
$cat_id = get_query_var('cat');?>
<meta name="keywords" content="<?php echo get_category_link( $cat_id );?>" /><?php
}?>
@esmi
Parse error: syntax error, unexpected '{'
I can't see the offending {?
Victor Petrescu
Member
Posted 1 year ago #
<?php
if ( is_category()) {
$cat_id = get_query_var('cat');?>
<meta name="keywords" content="<?php echo get_category_link( $cat_id );?>" />
<?php } ?>