Reputation: 165
I have a little problem with get_meta_tags. I want to include it on several sites, so it must take meta from current site.
$current_site = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$tags = get_meta_tags($current_site);
Tried to do this that way (when I echo $current_site i get the proper address), byt can't get metatags when using it :(
Upvotes: 1
Views: 578
Reputation: 1745
Since your site is all https, you should add https://
to the front of your variable.
$current_site = 'https://'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
$tags = get_meta_tags($current_site);
Upvotes: 1