your problem boils down to doing things before the init
hook was fired. You should never check for code existence, DB structure before it. In case of frontend related code you should not do anything before template_redirect
hook.
Your code should be like
add_action('wp_head', 'myoverride', 1);
function myoverride() {
if ( class_exists( 'Vc_Manager' ) ) {
remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}
}
Related Posts:
- WordPress Code Flow
- How can i get the name parameter defined in get_header?
- Is there a way to read or list wp_head() contents?
- Multi-page posts do not get indexed by Google due to canonical URLs
- Remove rel=’dns-prefetch’ href=’//maps.google.com’ from wp-head
- How to remove pingback from head?
- wp_head() outputs in body
- Change dns-prefetch to preconnect for external enqueued resources
- How to remove unnecessary elements in the HTML document head
- wp_head() not including styles and javascripts after a template redirect
- removing wordpress generated code from the head section?
- Change default s.w.org dns-prefetch resource hint value
- using wp_head in body tag for css style
- Use wp-load() and wp_head() to render a page’s header outside of WordPress
- Set title of page using custom page template
- How do I add a logo to my website?
- Set up description meta automatically
- How to find which plugin is outputting Open Graph tags to
- Why would wp_head() cause the menus to break?
- wp_head function outputs after
- Remove_action inside a function
- Does adding a callback like this to wp_head allows you to add additional content?
- How can i remove JUST Description tag from wp_head() function?
- Custom page with WP Header showing Page not found title
- Getting the contents of wp_head while in admin?
- Wp_head () affecting my images layout
- How to add meta tags inside single image page?
- How to store wordpress functions (wp_head(),wp_footer()) in a javascript variable?
- “Warning: count()” printing in Page templates
- How can I edit a meta description
- Hide page name in wordpress page title
- Is it possible to add post specific info in head of worpress post for OG use
- Unable to apply selective loading
- why php tag is not working if i store and show it in wp_head?
- output specific location in the header
- Data validation for inline javascript
- Add OG meta tags to wp head
- and
- How to Link External jQuery/Javascript files with WordPress
- Add tags to the section via functions.php
- Why is wp_head() creating a top margin at the top of my theme header?
- How can I remove the site URL from enqueued scripts and styles?
- How to add stylesheets only to pages with specific shortcode?
- force enqueue script to be first in order of prominence
- What does l10n.js do in WordPress 3.1? And how do I remove it?
- Any advantage of using wp_scripts and is_IE when enqueuing scripts
- Remove meta robots tag from wp_head
- Caching and Versioning for rtl.css
- How do I force wp_enqueue_scripts to load at the END of ?
- Two title tags in my header
- wp_head() gives me some weird CSS
- How can I modify what is being output in wp_head, whether by a theme or WordPress in general?
- Removing specific style from wp_head
- Change Page’s Tag Using functions.php File
- How to control initial wp_head() output?
- Hook into wp_head(); in a plugin
- How can I reduce the amount of files loaded/included per plugin?
- when should an action be added to init and when should it be added to wp_head
- Change title in head on Archive page
- How can I get wp_head() as a string instead of echoing it?
- Add code into on a per page/post basis
- Modify page title format (when using title-tag)
- Display custom_background outside wp_head()
- How to load different css file for different pages
- Putting content into header.php without using wp_head
- Track down where script is being enqueued from
- Wp_head and wp_footer vs wp_enqueue_script javascript files?
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Change meta tags programatically
- How to use wp_enqueue_style() and wp_enqueue_script() only when needed?
- How to properly insert a stylesheet in wp_head
- append stylesheet via shortcode
- Change dns-prefetch to preconnect with correct protocol
- Remove specific CSS and JS from the head
- Using auth_redirect returns cannot modify header information
- Searching hook to set cookies before and avoid “headers already sent”
- How to load plugin before the wordpress jquery?
- Why does wp_enqueue_script ignore my ‘wp_head’ hook?
- wp_head() remove redundant scripts?
- How can I make new .css file in child theme override styles in child theme’s style.css
- Manipulating wp_head content
- Manually add admin bar
- How can i remove JUST the title tag from wp_head() function?
- Indenting (tabbing) WP_head
- Disable wordpress from including jQuery in the head section
- wp_head() not inserting the default stylesheet style.css
- Deregister CSS style link ‘open-sans-css’
- How to add iOS & fav icons to the theme?
- Filter out some plugin action in wp head / wp_footer
- Move all the JS files to the bottom|footer, the right way
- Add HTML to single post tag
- add_action and wp_head not display content in head section
- How to add inline css/js inside a shortcode
- Header has extra HTML block at top before my code
- Trying to inject twitter metadata into using wp_head action in functions.php – get_the_excerpt() returns null
- wp_head function causes 30px blank space [closed]
- add action wp_head not working
- Replace category titles
- Remove all theme CSS & JS from wp_head (but only for 1 page template)