[wp-hackers] Theme Development: load stylesheet with wp_enqueue_style
Daniel
danielx386 at gmail.com
Sat Sep 21 07:56:14 UTC 2013
Does turning on wp_debug bring up anything? What the source code look
like when view your site? Is the style tag showing?
On 9/21/13, Guido WP <guido at wp-butler.com> wrote:
> Hi all,
>
> I'm developing my first (simple) WP Theme and I want to load the main
> stylesheet with wp_enqueue_style in functions.php.
>
> function my_scripts() {
> wp_enqueue_style( 'main-style', get_template_directory_uri() .
> '/style.css', false, '1.0', 'all' );
> }
> add_action( 'wp_enqueue_scripts', 'my_scripts' );
>
> I tried also get_stylesheet_uri() or get_stylesheet_directory_uri() .
> '/style.css' instead of get_template_directory_uri.
>
> If I load the stylesheet in the header.php by using a link tag everything is
> fine.
> The file is there, the get_template_directory_uri() function points to the
> right place - I tested it out by using echo command in frontpage.php
>
> I checked the apache logs, and the wp-logs - there are no error messages.
>
> I don't no where to start further analysis ?
>
> If I use another theme (e.g. twenty thirteen) the functions works - it's the
> same way the stylesheet is loaded.
> That means to me the system is o.k. - there must be something wrong with my
> theme.
>
> Are there any tools to analyze the execution process at the php site or set
> some breakpoints or create some log entries?
>
> Thank you very much for a hint or advise.
>
> Regards, Guido
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Regards,
Daniel Fenn
More information about the wp-hackers
mailing list