We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Add code meta tags to header? | Forum

Marcus
Marcus Mar 28 '16
Guys I wanna add rich snippets meta tags to header and since I have Spanish and English they are different.

What PHP code allows me to add code to header taking values from language keys?
Marcus
Marcus Mar 28 '16
Why this code ain't working?

function richsnippets(){

   $rich_snippet_meta = OW::getLanguage()->text('base', 'rich_snippet_meta');
               
                if ( !empty($customHeadCode) )
                {
                    $document->addCustomHeadInfo($rich_snippet_meta);
                }
   
}

OW::getEventManager()->bind(OW_EventManager::ON_AFTER_REQUEST_HANDLE, 'richsnippets');
Marcus
Marcus Mar 28 '16
I fount this solution but can figure how compile it and make it work.
http://www.oxwall.org/forum/topic/19659?page=1#post-94633