WordPress.org

Ready to get started?Download WordPress

Forums

Use of admin_head question (7 posts)

  1. desk003
    Member
    Posted 9 years ago #

    a few questions:
    first, is there a version (or a way) to make it replace and not add the information? second, is this synax:

    function greentheme_gethead() {
    echo "
    (head information here)
    ";
    }
    add_action ( 'admin_head', 'greentheme_gethead');

    correct?
    Third, when I add a <?php include (ABSPATH . 'wp-content/plugins/green-theme/head.php') ?> it errors out at the include. Can I not php include in a synax like that? I can't directly put the full text of admin_header.php because it errors out there too. what am i doing wrong?

  2. Kafkaesqui

    Posted 9 years ago #

    There is a remove_action(), though I'm not sure how it would work (if at all) on admin_head. What are you trying to "replace"?

    Don't see anything in your code that would keep it from working.

    When adding the include, is that with or without the <?php and ?> tags?

  3. desk003
    Member
    Posted 9 years ago #

    I need to change the location of the css.

    Yep, with the <?php and ?>

  4. desk003
    Member
    Posted 9 years ago #

    it just shows up as text without the <?php and ?>

  5. desk003
    Member
    Posted 9 years ago #

    okay.. i was wrong, it doesnt error out with the whole string (<?php include (ABSPATH . 'wp-content/plugins/green-theme/head.php') ?>), it just adds it like a comment, it does not execute it. sorry.

  6. desk003
    Member
    Posted 9 years ago #

    any ideas anyone?

  7. desk003
    Member
    Posted 9 years ago #

    NVM. figured this out as well.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.