wordpress添加页面
WordPress comes with an intuitive visual editor that covers all your basic needs for posting content. No coding is needed. However, when making custom pages or posts, you might need to add your own PHP code.
WordPress带有直观的可视化编辑器,可满足您发布内容的所有基本需求。 无需编码。 但是,制作自定义页面或帖子时,可能需要添加自己PHP代码。
How to add PHP to a WordPress page or post properly? Read on, I’ll present the easiest way to do that just below.
如何将PHP添加到WordPress页面或正确发布? 请继续阅读,下面我将介绍最简单的方法。
什么是PHP? (What is PHP?)
PHP full form is Hypertext Preprocessor, a server-side scripting language used for web development.
PHP的完整格式是Hypertext Preprocessor ,它是用于Web开发的服务器端脚本语言。
As a scripting language, PHP is used to handle routine tasks, which means using the same code for repetitive tasks, like displaying today’s time on a website, for example.
作为一种脚本语言,PHP用于处理日常任务,这意味着对重复性任务使用相同的代码,例如在网站上显示今天的时间。
Being a server-side language, it requires a PHP module installed on the server for processing PHP scripts. The script can be embedded into an HTML file, and once interpreted, will be displayed in the browser.
作为服务器端语言,它需要在服务器上安装一个PHP模块来处理PHP脚本。 该脚本可以嵌入到HTML文件中,并且一旦被解释,将显示在浏览器中。
Here’s a very basic example of a PHP script:
这是一个非常基本PHP脚本示例:
<?php
echo 'Hi, Guys!';
?>
And here’s the output as seen on a web browser:
这是在网络浏览器上看到的输出:
Before moving on to the how’s, it is important to ensure your WordPress knowledge is up to snuff. Adding PHP code to WordPress requires you to have at least basic knowledge of how WordPress works. There are many websites like HostingWiki that can widen your horizons about WordPress and everything related to web development.
在继续进行之前,确保您的WordPress知识不容小sn非常重要。 向WordPress添加PHP代码要求您至少具有WordPress工作原理的基本知识。 有许多网站,例如Hosting