0

I have uploaded the index.php, sidebar.php, footer.php, header.php and style sheet to WordPress as a zipped file for a new theme so my blog posts since 2012 will match the new website template.

However in preview although you can see the list of blogs I have written there is no background shown.

What have I done wrong and how do I get my blog to match my website?

1

Previews aren't always 100% accurate, so you could actually activate the new theme and test from there. If that's not an option, it's safer to copy your current site to a staging server and test it out there. Most likely some of the paths in the stylesheet are pointing to the wrong folder. If you inspect the element where you expect a background with dev tools, it should show you whether the image was found or not. If not found then double-check what folder everything is in.

Many stylesheets use relative paths like /styles/background.jpg rather than spelling out http://example.com/theme/styles/background.jpg so if your WordPress blog is in say a subfolder like http://example.com/blog/ and the stylesheet is using a relative path, you're telling WordPress to look in http://example.com/blog/styles/ for the background image when in fact that is not the right folder. In this case you would need to change the stylesheet to point to ../styles.background.jpg (the ../ says go up one level).

0

Please inspect the page and see if there is any 404 error for css file. If you find the 404 error for the css file then it means css file is not found (loading ) for the page.

Following are the possible reasons for the 404 error. ---Incorrect path for the file. --- Missing of the file from the path. --- Cache Issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.