, etc."/> , etc.">
Home >CMS Tutorial >WordPress >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
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('url');?>
Related recommendations: "WordPress Tutorial"
Get the theme directory, The three methods are as follows:
//第一种方法 <?php bloginfo('template_url');?> //第二种方法 <?php bloginfo('template_directory'); ?> //第三种方法 <?php echo get_template_directory_uri(); ?>
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>
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('stylesheet_url'); ?>" />
The above is the detailed content of where is wordpress theme. For more information, please follow other related articles on the PHP Chinese website!