I have a problem with WordPress, I’ve created all needed files including style.css index.php and so on but the page is not styled. In header, among other things, I’ve put this
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="text/css" href="<?php bloginfo('template_url'); ?>/css/style.css" />
Add stylesheet other than
style.css
, openfunction.php
and add the following code.Add the style.css file using thins:
Add the following to your functions.php, it should work.
Open function.php file and past the following code.
For my case, i had not linked CSS. So i solved it by doing the following:
After that i had to create another new file in the themes folder called functions.php and linked style.css in this file using the following code.
I had the same problem, but I fixed it by looking carefully in my code. This is what I wrote before:
As well as the following code helped me solved the problem:
Can you see the difference? Comment below if you have any questions.
when you also have 2 site URLs or home URLs in your plugins or CSS when you look it up in the inspection on chrome or some browser. And opening this in a new tab (btw this should not be accessible)::
then try to put
“/” without the “” in your localhost or whatever > phpmyadmin > database (of WordPress) > wp_options >> “siteurl” and “home” in option_value
Replace
template_url
withtemplate_directory
inbloginfo
and all done like:In functions.php add this code it will link style.css file to your WordPress theme