Forums

manipulate wp_head() (2 posts)

  1. thaindian
    Member
    Posted 1 year ago #

    We are working on WordPress multisite (formerly WPMU) and need to hack the functionality of wp_head() used in the template.

    Basically, what i need is an array of javascripts(and css) wp_head() intends to insert into the page and make sure wp_head() doesnt insert it .

    I want to handle the loading of those scripts myself and not effect the other workings of wp_head() . If it were a single blog, i could simply do away with wp_head and hardcode everything i needed. but here there are hundreds of sites using the same theme and different plugins, so its important for plugins to be able to use regular wordpress functions to add javascripts and css.

    of course one way would be output buffer manipulation, but im looking for a lesser hacky solution.

  2. parisvega
    Member
    Posted 11 months ago #

    You may want to check out this plugin that lets you edit the output of wp_head():
    Head Cleaner
    http://wordpress.org/extend/plugins/head-cleaner/

    You can edit the core file, but that's not recommended.
    http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/general-template.php

    Found this Info on:
    http://wordpress.org/support/topic/inside-ltphp-wp_head-gt-can-i-edit-what-it-displays?replies=5#post-1386702

Topic Closed

This topic has been closed to new replies.

About this Topic