WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Stylesheet not loading on single posts. (7 posts)

  1. jxile
    Member
    Posted 3 years ago #

    I have been having an issue with my blog, it is not loading the stylesheet on single posts, and on tag pages either. It loads it fine on my pages, and home page, but not on any other. My website is J-Xile.com.

    The last that I noticed it worked correctly was a few days ago. I was messing with the single.php, index.php, and page.php trying to add the Yoast Breadcrumbs code to my blog, and thats when I noticed it stopped working. I have reverted all of the code, but no luck.

    I have also installed several other plugins right before it stopped working, let me know if that might be the issue and I will post them. Thanks for any help.

  2. govpatel
    Member
    Posted 3 years ago #

    check if you have header included in the template file looks like its not loading your header as that is where style code is.

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    the way you link your style sheet (with a relative url):

    <link rel="stylesheet" type="text/css" media="screen" href="../wp-content/themes/pixel/style.css" />

    is somehow different from the 'normal' way used by most themes, which use an absolute file path (for instance):

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
  4. jxile
    Member
    Posted 3 years ago #

    I tried putting the code in and it didn't work on the template or header:

    <link rel="stylesheet" href="<?php bloginfo('../wp content/themes/pixel/style.css"'); ?>" type="text/css" media="screen" />

    Is this style sheet url correct for the code do you think?

    I checked the single.php, and the page.php and both have the code:
    <?php get_header(); ?>

    Is there another file I should be checking for the header code as well?

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    what is wrong with this:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    have you at least tried it?
    works in most themes ...

    don't make anything up the way you think it might be - read:
    http://codex.wordpress.org/Function_Reference/bloginfo

  6. jxile
    Member
    Posted 3 years ago #

    I am happy to report that it is fixed now, I had entered in the code with the actual style sheet URL in the 'stylesheet_url' so it wasn't working. ^Thanks for all of the help!

  7. Ryan Paul
    Member
    Posted 3 years ago #

    Topic resolved button would be nice ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.