WordPress directory function adds dot to URL

I have done the following In my code:

/**
 * Enqueue scripts and styles
 */
function design_scripts() {
    wp_enqueue_style( 'style', get_stylesheet_uri() );

    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
        wp_enqueue_script( 'comment-reply' );
    }

    wp_enqueue_script( 'navigation', get_template_directory_uri() . 'js/navigation.js', array( 'jquery' ), '20120206', true );
}
add_action( 'wp_enqueue_scripts', 'design_scripts' );

But somehow the function adds a dot to the url like this:

Read More
http://domain/wp-content/themes/design/./style.css

Anybody knows why? Havent been able to figure it out yet myself.

Related posts

Leave a Reply

1 comment

  1. Try this:

    wp_enqueue_style( 'style', get_bloginfo('stylesheet_url') );
    

    On a side note, you don’t need to enqueue your theme’s normal Stylesheet if this is a theme you’re building. Adding it directly in your header is fine.

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />