disable wordpress canonical tag meta

wordpress core automatically generates canonical tag in HEAD section: <link rel=”canonical” href=”http://blabla.com” /> how to disable/remove that? 1 1 found solution: before wp_head() command, insert: remove_action(‘wp_head’, ‘rel_canonical’); p.s. if generator meta tag is being added from elsewhere (i.e. from theme or plugin, rather than wp-core) and was priority other than 10, then you might need … Read more

Is there a way to enable Cross-Origin Resource Sharing for WordPress’ ajaxurl?

WordPress already has a default URL for jQuery-WordPress application calls and it’s well known as the ajaxurl. However, there are cases wherein one would need to enable Cross-Origin Resource Sharing (CORS) on it such that any hostname will be able to access using it. My current solutions is by adding a line in /wp-includes/http.php with: … Read more

How to remove rest api link: in http headers?

i would like to remove the “link:” line added to the http headers since wordpress 4.4 here is a curl -I killcandida.org here is the output extract of the line that i would like to delete: Link: <http://killcandida.org/wp-json/>; rel=”https://api.w.org/” Note that i don’t talk here about html headers but http headers. 1 1 The output … Read more

wp_headers vs send_headers. When to use each?

I’ve seen wp_headers and send_headers both used before for the same thing and I’m wondering how you’re suppose to know which one to use and when… On the send_headers codex page there’s an example of adding the X-UA-Compatible: IE=edge,chrome=1 for Internet Explorer backward compatibility since the meta tag often fails on intranet sites if loaded … Read more

wp_redirect() – headers already sent

I am trying to use wp_redirect() to redirect the user after successfully submitting a signup form on the page. It’s not working and shows the following error: Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/theme/wp-content/themes/test/header.php:10) in /Applications/MAMP/htdocs/theme/wp-includes/pluggable.php on line 1178 I understand there has been already output before, that’s … Read more