WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] add_action Not Printing (3 posts)

  1. cpoteet
    Member
    Posted 7 years ago #

    I have a plugin with the following code, but for the life of me it won't print to the header. Ideas?


    $wp_smoothscroll_url = get_bloginfo('wpurl') . "/";

    function wp_smoothscroll() {

    echo '
    <script type="text/javascript" src="'.$wp_smoothscroll_url.'wp-content/plugins/smoothscroll/smoothscroll.js"></script>
    ';
    }

    add_action('wp_head', 'wp_smoothscroll');

  2. Kafkaesqui

    Posted 7 years ago #

    Is there a:

    <?php wp_head(); ?>

    line in the active theme's header.php?

  3. cpoteet
    Member
    Posted 7 years ago #

    No there was not. Resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic