Home > CMS Tutorial > WordPress > where is wordpress theme

where is wordpress theme

爱喝马黛茶的安东尼
Release: 2019-07-18 15:26:04
Original
2901 people have browsed it

where is wordpress theme

The template folder generally refers to the theme folder. The directory of the theme folder is like this:

wp-content/themes/xxxx
Copy after login

The xxxx here is the theme folder. Just put the page template into the main folder. Of course, it will only be useful in whichever theme folder you put it into.

When making a wordpress theme, the header.php and footer.php of the theme need to reference some css files and js files in the current theme folder, so we need a fixed and quick way to obtain the current theme path method.

First of all, let’s first understand how to call the function of the current website address:

<?php bloginfo(&#39;url&#39;);?>
Copy after login

Related recommendations: "WordPress Tutorial"

Get the theme directory, The three methods are as follows:

//第一种方法
<?php bloginfo(&#39;template_url&#39;);?>
//第二种方法
<?php bloginfo(&#39;template_directory&#39;); ?>
//第三种方法
<?php echo get_template_directory_uri(); ?>
Copy after login

Call the jquery.js library in the js folder under the theme folder. Method:

<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.js"></script>
Copy after login

Call the Css style sheet (style.css) under the theme folder. ), we also have a faster method:

<link rel="stylesheet" type="text/css" href="<?php bloginfo(&#39;stylesheet_url&#39;); ?>" />
Copy after login

The above is the detailed content of where is wordpress theme. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template