• Hi there,

    I created my first own theme for WordPress and now I want to add some plugins such as Slickr Flickr. It looks ugly, because the CSS and JS won’t load. They aren’t added to the header file. How do I do that?

    I think I got over all the information in the WordPress Docs, but can’t find the solution..

    Thanks in advance ??

    Kind regards, Sebastiaan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter sverschuren

    (@sverschuren)

    Anyone?

    Are they not loading because they aren’t being included in your header or is there some other reason? Can you post a link to you site so we can have a look?

    Thread Starter sverschuren

    (@sverschuren)

    I think because they’re not included.. Kinda new to the whole templating thing for WP ??

    https://sebastiaanverschuren.nl

    In your header I see this under your title tag:
    <link media="screen" href="style.css" rel="stylesheet">
    That won’t work because it is expecting to find that file in yourdomain.com/style.css

    You should try something like this:
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/another-style.css" media="screen" />
    if the style file is in your template directory.

    Thread Starter sverschuren

    (@sverschuren)

    But that’s not the problem I think, CSS of the theme loads fine! It’s the CSS (and JS) of plugins that I’m having trouble with. If you go to this page: https://www.sebastiaanverschuren.nl/?page_id=57 it just doesn’t load up. And it’s just a standard Slickr Flickr page.

    Did the flickr plugin come with a stylesheet? If yes, use this:

    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/another-style.css" media="screen" />

    where another-style.css is the name of the file that contains the required styles.

    If the plugin didn’t come with a stylesheet, you will have to add them to your style.css or use make another file and use the snippit above to load that file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Header: how to automatically insert CSS, JS w/ plugin’ is closed to new replies.