Posts: 55
Threads: 13
Joined: Jul 2013
I am trying to convert HTML files to PHP using
http://get-simple.info/wiki/themes:tutorial as a guide.
My problem is that style.css is not being accessed. The code I am using is:
Code:
<link href=”<?php get_theme_url(); ?>/style.css” rel="stylesheet" type="text/css" media="screen" />
If I view the page source, I get this:
Code:
<link rel="canonical" href="http://localhost/My_CMS_Template/" />
<link rel="stylesheet" type="text/css" href="style.css" />
It's probably staring me in the face, but I don't see it.
thanks
I'm no Einstein, nor do I profess to be. Just saying what I would try in the circumstances.
Posts: 1,108
Threads: 70
Joined: Aug 2009
go to the settings page and make sure the site url is set to you full site url.
Posts: 55
Threads: 13
Joined: Jul 2013
(2013-09-14, 03:10:09)n00dles101 Wrote: go to the settings page and make sure the site url is set to you full site url.
The Website URL on the Settings page is http://localhost/My_CMS_Template/
I even changed it to http://localhost/My_CMS_Template/theme/ and http://localhost/My_CMS_Template/theme/My_Theme without any luck.
From
Code:
<link rel="canonical" href="http://localhost/My_CMS_Template/" />
<link rel="stylesheet" type="text/css" href="style.css" />
It looks like its picking up the site URL and adding style.css to it, resulting in http://localhost/My_CMS_Template/style.css
I don't think it is getting the theme url.
thanks
I'm no Einstein, nor do I profess to be. Just saying what I would try in the circumstances.
Posts: 55
Threads: 13
Joined: Jul 2013
I knew it was staring right at me. I had copied the code directly from the tutorial page.
Code:
<link href=”<?php get_theme_url(); ?>/style.css” rel="stylesheet" type="text/css" media="screen" />
Look at the first set of quotes. I retyped those in Notepad++ and now we're hunky dory
thanks
I'm no Einstein, nor do I profess to be. Just saying what I would try in the circumstances.
Posts: 1,127
Threads: 136
Joined: Feb 2012
2013-09-14, 09:04:28
(This post was last modified: 2013-09-14, 19:47:31 by Timbow.)
Ouch! How annoying for you. I see the quotes are all odd in the wiki text, I will fix it if I can.
That should be all fixed now. Thanks for pointing it out, Lucian.
Posts: 55
Threads: 13
Joined: Jul 2013
No probs mate, and thanks for the excellent tutorial.
I'm no Einstein, nor do I profess to be. Just saying what I would try in the circumstances.