New Wordpress Theme Not Showing in Blog

admin2025-06-04  2

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?

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?

Share Improve this question edited Jan 17, 2019 at 15:43 Gufran Hasan 6918 silver badges20 bronze badges asked Jan 17, 2019 at 14:27 SandySandy 1
Add a comment  | 

2 Answers 2

Reset to default 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/theme/styles/background.jpg so if your WordPress blog is in say a subfolder like http://example/blog/ and the stylesheet is using a relative path, you're telling WordPress to look in http://example/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).

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749000845a315511.html

最新回复(0)