Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Theme is not linking to style.css

Featured Replies

hi guys

 

If someone could let me know where I'm going wrong I would be very grateful.

 

I'm attempting to import a static html, css website into wordpress and build a custom theme around it. I've followed this tutorial:

 

http://thethemefoundry.com/blog/html-wordpress/

 

Everything seems to make sence, but I just can't figure out why my very basis theme isn't linking to the uploaded style.css. My testing website is here:

 

http://finishme.comoj.com/

 

Any help would be great, as it's been driving me mad!

 

Thanks.

  • Author

Thanks for the reply, I've added the following into the 'header.php' file:

 

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

 

Also tried:

 

<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" />

 

But it doesn't seem to make a difference.

 

My 'style.css' is uploaded into the theme folder with 'header.php' etc. Not sure what I'm doing wrong?

Edited by slicecbr

try this

  <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.css">

also can u post a screenshot of the files in ur theme folder?

 

if possible also post ur header.php code

 

you can also

check these tutorials

Edited by sash_oo7

As suggested this does look like the link to the stylesheet is not working.

 

Depending on where your file is then this affects where the links should go.

 

Most wordpress themes have the CSS sheet in with all the page and partial templates so perhaps as Sash suggests post a pic of the file structure.

 

One way of getting round this is by grabbing the URL of the stylesheet and hard coding it into the header using the full URL. IF that works then you can figure out which <?php> call to use

  • Author

Thanks for the reply guys - much appreciated!

 

I used your code sash_007 and that linked it! Nice One. My CSS file is in the same folder mixed in with the header.php etc.

 

Thanks for the tutorial link also, I think I'll need them.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.