WordPress.org

Ready to get started?Download WordPress

Forums

TEMPLATEPATH not echoing correct path under WAMP on windows (1 post)

  1. aeboi80
    Member
    Posted 1 year ago #

    I am trying to figure out what is going on with my localhost WAMP install of WordPress.

    I have the following defined in my functions.php

    define('TEMPLATEPATH', get_template_directory());

    I am then later in the file attempting to enqueue some files:

    // Enqueue Scripts
    function bluehive_scripts() {
    	wp_enqueue_style( 'style', get_stylesheet_uri() );
    
    	wp_enqueue_script( 'bootstrap-script', TEMPLATEPATH . '/lib/bootstrap/js/bootstrap.js' );
    
    }
    add_action( 'wp_enqueue_scripts', 'bluehive_scripts' );

    When I go to view the page source to see if bootstrap.js is being included in the <head> its showing up as:

    <script src="http://localhost:8081/bluehiveC:wampwwwbluehive/wp-content/themes/bluehivepress/lib/bootstrap/js/bootstrap.js?ver=1" type="text/javascript"></script>

    Why is it showing http://localhost:8081/bluehiveC:wampwwwbluehive ?

    It should be showing as:

    http://localhost:8081/bluehive/wp-content/themes/bluehivepress/lib/bootstrap/js/bootstrap.js?ver=1

    Thanks for your assistance,

    Chad

Topic Closed

This topic has been closed to new replies.

About this Topic