城市简码
Shortcodes in WordPress allow you to add various functionality into posts, pages, and widgets without actually writing any code. Hence the name, Shortcode. Many WordPress plugins and some themes use shortcodes to add different elements such as pricing grid, event calendar, etc into WordPress. In this article, we will share 7 essential tips for using shortcodes in WordPress.
WordPress中的简码使您无需实际编写任何代码即可将各种功能添加到帖子,页面和小部件中。 因此,名称为Shortcode 。 许多WordPress插件和某些主题使用短代码向WordPress中添加不同的元素,例如定价网格,事件日历等。 在本文中,我们将分享7个在WordPress中使用短代码的基本提示。
WordPress中的简码是什么? (What are Shortcodes in WordPress?)
Any content added in a WordPress site goes through some security checks and filters. These security checks and filters make sure that no malicious code goes into posts, pages, comments, etc. This means you can’t directly write code in these areas.
WordPress网站中添加的所有内容均经过一些安全检查和过滤器。 这些安全检查和过滤器可确保帖子,页面,评论等中没有恶意代码。这意味着您不能直接在这些区域中编写代码。
On the other hand, sometimes you just need to add code in these areas. Shortcodes provide a way to do that.
另一方面,有时您只需要在这些区域中添加代码。 简码提供了一种方法。
Shortcodes make it easier to add other elements into WordPress posts. For example, you can add a beautiful responsive slider using a simple shortcode. You can create a complex survey form in WordPress without writing a single line of code.
使用简码可以更轻松地将其他元素添加到WordPress帖子中。 例如,您可以使用简单的简码添加漂亮的响应式滑块 。 您可以在WordPress中创建复杂的调查表,而无需编写任何代码。
Having said that, lets take a look at some tips for using shortcodes in WordPress.
话虽如此,让我们看一下在WordPress中使用短代码的一些技巧。
提示1.知道何时不使用简码 (Tip 1. Know When Not to Use Shortcodes)
Shortcodes are great, but using shortcodes i