Warning! The RK-CMS distribution is distributed exclusively through rk-cms.ru. Downloading copies from third-party resources may result in data loss or installation of malware.

Menu
    300 140

    What are shortcodes? In simple terms.

    Imagine you're writing text in a regular text editor (like Notepad) and need to insert a nice button, contact form, or image gallery into the page. To do this manually, you'd have to learn HTML, CSS, and maybe even PHP—it's time-consuming and complicated.

    A shortcode is a kind of shortcut or magic word that you insert into your text, and the system automatically replaces it with a ready-made, complex piece of code.

    A simple analogy: You tell the waiter at a restaurant, "I'll have breakfast #3." For you, it's just one short phrase, but in the kitchen, the chef knows what it means: scrambled eggs, toast, coffee, and orange juice. The shortcode is your "breakfast #3" for your website.

    What's the difference between paired shortcodes and single shortcodes?

    1. Single (self-closing) shortcodes

    This shortcode does one specific thing and doesn't require a closing tag. It's simply inserted into the desired location in the text.

    Structure:

    [shortcode_name parameter="value"]

    [shortcode_name] is the "command name." parameter="value" are additional settings (attributes). There may be several of these, or none at all. A simple analogy: It's like the command "turn on the light" or "put the kettle on." A single action without further clarification.

    2. Paired (enclosing) shortcodes

    This shortcode works with a specific piece of text or content that you place between the opening and closing tags. It "wraps" your content. Structure: [code][shortcode_name parameter="value"]Your text or content here[/shortcode_name][/code]

    Note the / (slash) in the closing tag—it indicates where the shortcode's action ends.

    A simple analogy: It's like the command "bold this paragraph." You specify the beginning and end of the area to which the effect should be applied.

    Summary:

    Shortcodes are the bridge between simple text and complex website functionality. They save you time, eliminate the need to delve into code, and make website management accessible to millions of people without technical training.

    Single ones are for inserting ready-made "things", paired ones are for formatting your own text.

    Category: Basics
    Back to Wiki

    We use cookies to improve the functioning of the site and its interaction with users. By continuing to use the site, you consent to the use of cookies (find out more).

    You can always disable cookies in your browser settings.