I will update Premium Account on this website Shareaccounts.org
Name Update Time
Netflix October 18, 2024 4:49 pm
Disney+ October 18, 2024 11:03 am
Max October 18, 2024 11:34 am
ChatGPT 4 October 18, 2024 2:27 pm
Spotify October 18, 2024 11:49 am
Prime Video October 18, 2024 5:17 pm
Codecademy October 18, 2024 5:08 pm
Grammarly October 16, 2024 2:31 pm
Canva Pro October 18, 2024 5:12 pm
Udemy Premium Cookies September 2, 2024 2:53 pm
I will update Premium Account on this website Shareaccounts.org

WordPress theme-Change the stylesheet style.css path

Before this, the homepage you saw was messy because the css style had not been loaded. Now let’s add the style together. You can find this code in header.php:

`<link rel=”stylesheet” href=”./style.css” type=”text/css” media=”screen” />
`

You may ask: Isn’t there already a style.css in the wp-content\themes\bbbbf directory? Then why doesn’t header.php load css? As a result, you can see that the page is messy and it is certain that css is not loaded. Because this is a WordPress theme, it is called by the main program of WordPress and needs to be parsed layer by layer before your blog can be displayed, rather than a simple html static web page file. Correct way to change:
`<link rel=”stylesheet” href=”<?php%20bloginfo(‘stylesheet_url’);%20?>” type=”text/css” media=”screen” />
`
~~~
bloginfo(‘stylesheet_url’) outputs the absolute URL of your theme’s css file, such as http://localhost/wp/wp-content/themes/bbbbf/style.css. The WordPress program will automatically identify your WordPress installation address and the currently enabled theme, and automatically output this style.css link. Now you can try to change it, then refresh your blog homepage and check the source code of the webpage. Is the link of style.css changed to yours? Can the page be displayed normally?
~~~

What if your css file is not style.css and is not in the root directory of the theme? We can use <?php bloginfo(‘template_url’); ?> to get the URL of the theme root directory. For example, if your theme css file is abc.css, then we can write it like this: <?php bloginfo(‘template_url’); ?>/abc.css. If it is in the subdirectory css, then it is like this: <?php bloginfo(‘template_url’); ?>/css/abc.css. The same is true for loading js files.

However, there are still a few pictures whose paths are incorrect and cannot be displayed. Now let’s use a text editor to open index.php, archive.php, contact.php, full_width.php, page.php and single.php, add the correct URL to these pictures, search the code, and replace all: src=”images/,%20batch%20replace%20with%20src=”<?php bloginfo(‘template_url’); ?>/images/. Now refresh your homepage to see if the article thumbnails can be displayed normally. <?php bloginfo(‘template_url’); ?> is used to output the URL of the theme directory.