Oxwall - Remove meta tags

80 views Asked by At

How can i remove meta tags in Oxwall software or any software. The Oxwall core loads on auto wrong Facebook meta tags.

Wrong value (generated by Oxwall):

<meta name="og:type" content="website" />

Correct value:

<meta property="og:type" content="website" />

Thanks in Advance

2

There are 2 answers

0
Ebenezer Obasi On BEST ANSWER

You can include the following line to your base or plugin init.php file. If you are not working with a plugin open /ow_system_plugins/base/init.php and add the following code:

function modify_custom_meta_property(){
    OW::getDocument()->addMetaInfo('og:type', 'website', 'property');
}
OW::getEventManager()->bind(OW_EventManager::ON_BEFORE_DOCUMENT_RENDER, 'modify_custom_meta_property');
0
ghost-dreams On

Finaly i find solution.

You have to do like this:

  1. Go to ow_system_plugins/base/classes/event_handler.php and end of the file remove or out comment all the lines where it add wrong facebook meta:

Example:

// $document->addMetaInfo("og:type", "website");

  1. Go to /ow_system_plugins/base/init.php and at top of file add code like this:

    function modify_custom_meta_property(){
    OW::getDocument()->addMetaInfo('og:type', 'website', 'property');
    OW::getDocument()->addMetaInfo('og:title', 'Your awsome title here', 'property'); } OW::getEventManager()->bind(OW_EventManager::ON_BEFORE_DOCUMENT_RENDER, 'modify_custom_meta_property');

Clear your website cache and look the source code of your page, now correct metas should bee added and the wrong metas gone.