Glossary

Shortcode — Что такое шорткоды WordPress?

Шорткоды WordPress — это короткие теги-заполнители, такие как [gallery], которые заменяются сложным кодом при рендеринге.

Definition

A WordPress shortcode is a short tag in square brackets — e.g. [gallery], [contact-form-7], or [et_pb_section] — used in content or templates. WordPress replaces this tag during rendering with the associated PHP code, which can be arbitrarily complex.

What are shortcodes used for?

Shortcodes serve as a simplified interface for complex functionality. Typical use cases: embedding galleries ([gallery]), contact forms ([contact-form-7 id='...']), slider elements, pricing tables, or the structured blocks of page builders like Divi ([et_pb_section]).

Shortcodes in Divi 4

Divi 4 stores page content as nested shortcodes: [et_pb_section] contains [et_pb_row], which contains [et_pb_column], which in turn contains [et_pb_text] and other modules. anipage.io generates this format natively for Divi 4 export.

Shortcodes vs. Gutenberg blocks

Gutenberg blocks have replaced shortcodes as the standard content storage format. Instead of [gallery], <!-- wp:gallery --> is now used. However, shortcodes remain fully compatible and supported by WordPress — especially in older themes and plugins like Divi 4.

Frequently Asked Questions

Can I use shortcodes in Gutenberg?
Yes. Gutenberg has its own 'Shortcode' block that renders existing shortcodes. For new content, however, native Gutenberg blocks are recommended.
What's the difference between shortcodes and blocks?
Shortcodes are text placeholders that trigger PHP functions. Gutenberg blocks are structured HTML comments with their own rendering system — more modern and flexible.
Does anipage.io use shortcodes?
For Divi 4 exports, yes — anipage.io generates native Divi 4 shortcode markup. For Gutenberg and Divi 5, no shortcode format is used.

Готовы создавать страницы WordPress за минуты?

Начните бесплатно с 3 генерациями в месяц. Без кредитной карты. Без обязательств. Отмена в любое время.

Начать бесплатно сейчас

Related Terms

Related Articles