customization - Custom CSS working on home page but not on NEW created PAGE

I have this WP websitewith a lot of custom css. Everything works fine at the home page. Which is the the last mention

I have this WP website / with a lot of custom css. Everything works fine at the home page. Which is the the last mentioned link.

To finish the project I created the imprint right here / which a new WP page.

But my custom CSS is no applied!

Even that is loaded and computed for the element in question.

Example: I use "Acumin Pro" mainly as my font family. On the Imprint site its not loaded, even in the menu. I applied this font as main font for the body tag, so it should get applied. And like I mention: it is actually computed as you can see the the dev tools.

I have this WP website http://darius-mann/smardigo/ with a lot of custom css. Everything works fine at the home page. Which is the the last mentioned link.

To finish the project I created the imprint right here http://darius-mann/smardigo/impressum/ which a new WP page.

But my custom CSS is no applied!

Even that is loaded and computed for the element in question.

Example: I use "Acumin Pro" mainly as my font family. On the Imprint site its not loaded, even in the menu. I applied this font as main font for the body tag, so it should get applied. And like I mention: it is actually computed as you can see the the dev tools.

Share Improve this question asked Jan 6, 2020 at 19:28 Darius MannDarius Mann 101 5
  • My best guess is that you are using a cache utility which is caching your styles and creating a problem. Unfortunately, you are using minified stylesheets, so I cannot help you troubleshoot any further. Your stylesheet IS loading. So, I would guess that your reference to the font files need fixing. – Mike Baxter Commented Jan 6, 2020 at 21:05
  • I am using not caching plugin yet or anything else. The minified stylesheet might be from the DIVI theme i am using. Because my own custom css is not minified. – Darius Mann Commented Jan 6, 2020 at 21:09
  • If you updated your "home.php", but not your "index.php" you would have this problem. I noticed that there are several differences in classes applied to your <html> and <body> tags. This could indicate that your page templates are not setup correctly. If you have not done so, refer to Page Template Files for assistance. – Mike Baxter Commented Jan 6, 2020 at 21:21
  • Found your key symptom. Inspecting your Impressum page with Chrome indicates loads of 404 errors. For example: darius-mann/smardigo/impressum/costum/hexagon/hexagon.js not found. If I remove the "impressum/" the file opens correctly. However your theme is building your reference URLs, it is including the current page URL, not just the site URL. You might reference this WPBeginner article for the best way to reference CSS and JS files from your theme or plugin. – Mike Baxter Commented Jan 6, 2020 at 21:32
  • the missing files made the trick. Thank you, I fixed it! – Darius Mann Commented Jan 6, 2020 at 22:00
Add a comment  | 

1 Answer 1

Reset to default 0

Copied from comments, so the question will indicate an answer has been provided:

Found your key symptom. Inspecting your Impressum page with Chrome indicates loads of 404 errors. For example: http://darius-mann/smardigo/impressum/costum/hexagon/hexagon.js not found. If I remove the "impressum/" the file opens correctly.

However your theme is building your reference URLs, it is including the current page URL, not just the site URL. You might reference this WPBeginner article for the best way to reference CSS and JS files from your theme or plugin

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744855662a4597387.html

相关推荐

  • customization - Custom CSS working on home page but not on NEW created PAGE

    I have this WP websitewith a lot of custom css. Everything works fine at the home page. Which is the the last mention

    2天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信