Support » Fixing WordPress » Permalinks breaking my theme (or other way round)

  • Resolved Pawel



    I have been creating a custom WordPress theme lately and all was well: theme was working on my local XAMPP environment as well as on online WordPress installation that I have set up to ask friends about their opinions.

    Problems showed up when I moved the theme to my actual blog – although I could view all the posts while using index.php, all the formatting seemed to be gone when I navigated to a post or page (single.php & page.php, see screenshots). After some tweaking, I figured out that problem (probably) lies with permalinks. On my main blog, I have custom permalink structure:


    On both of my testing blogs I was using default permalinks as I didn’t care about it really. Once I changed permalink structure on localhost and online testing installation to other than default, I had the same issues there.

    So basically, my single.php and page.php pages do not work properly if permalinks structure is not set to default.

    Screenshot of working single.php
    Screenshot of faulty single.php

    My header.php

    My test site is located at

    Note: my theme successfully passes W3C HTML5 validation test.

    Anyone might suggest a fix for this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi


    Forum Moderator

    You need to amend the link to the stylesheets in header.php so that they all point to the current theme’s folder. See

    Ah, it was that simple…

    I have been storing theme’s stylesheets in the root (apart from an empty style.css in theme’s directory) as I was creating two identical themes – one translated into Polish, other into English. It seemed easier to have just a single set of stylesheets.

    Anyway, thanks a lot! Working perfectly now 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permalinks breaking my theme (or other way round)’ is closed to new replies.