- Learn to Create WordPress Themes by Building 5 Projects
- Eduonix Learning Solutions
- 167字
- 2021-07-02 19:18:23
Adding a function in the head tag
We will next see how to enter a function called wp_head() in the <head> tag. This puts any additional information that is needed into the head tag. For example, when you install a plugin and, let's say, it needs to include a style sheet, or it needs to do something in the head, to do this we need to enter the following code. So when you create plugins, you can have stuff pop out right in the head:
<!DOCTYPE html>
<html <? php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<title><?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<?php wp_head(); ?>
In the following source code, we have a bunch of other stuff now, and this is all coming from that wp_head() function:

If I go ahead and take the wp_head() function out, and then go back and reload, it just gives us what we have in the index.php file. So we're going to need the wp_head() function:

In the next section, we'll start to build out the body. We will see how to grab posts, create menus, and so on.
- 從零開始構建企業級RAG系統
- ASP.NET Web API:Build RESTful web applications and services on the .NET framework
- 深入理解Bootstrap
- PaaS程序設計
- OpenNI Cookbook
- Solr Cookbook(Third Edition)
- AutoCAD 2009實訓指導
- Spring+Spring MVC+MyBatis從零開始學
- 平面設計經典案例教程:CorelDRAW X6
- Visual Basic程序設計(第三版)
- 從程序員角度學習數據庫技術(藍橋杯軟件大賽培訓教材-Java方向)
- Java從入門到精通(視頻實戰版)
- Laravel Design Patterns and Best Practices
- Spark技術內幕:深入解析Spark內核架構設計與實現原理
- 軟件設計模式(Java版)