[Support request] Shortcodes

Home Forums Support [Support request] Shortcodes

Home Forums Support Shortcodes

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #872361

    I need to insert HTML code in different places on different pages. At the same time, I should be able to change this code at any time. I can’t use hooks for this, so I want to use shortcodes.
    I would like to know your opinion:
    1. Is it normal to use shortcodes in this case?
    2. In your experience, won’t the shortcodes slow down your site?
    3. Can you suggest the best shortcode plugin? Now I have found only this one: https://ru.wordpress.org/plugins/shortcoder/, but it has not been updated for a long time.

    Thanks for your support!

    GeneratePress 2.2.2
    GP Premium 1.7.8
    Customer Support

    Hi there,

    shortcodes for the classic editor are still the best way for adding ‘global’ content inside your post content. The New Block Editor introduces re-usable blocks that can do the same thing.

    They make additional database requests but unless you’re using a lot of them the performance impact should be unnoticable.

    What type of content will you be adding? Will the shortcode use arguments/parameters or are they just displaying static HTML?


    Only html + css.
    For example, like this:

    <div style="float:left;text-align: center; border: solid 1px red; padding: 20px">image</div>
    <div style="text-align: center; border: solid 1px red; padding: 20px">text</div>
    Customer Support

    The problem is that I do not know PHP.
    Did I understand correctly what needs to be done:
    1. The name of my new shortcode I should write instead of “my_shortcode”.
    2. Insert HTML code instead of “short code example”.
    3. Install Code Snippets and insert this PHP code in there.
    4. On the page insert the shortcode in the right place.
    It’s right?

    Can CSS be included in HTML?
    Above, you mentioned “The New Block Editor” – did you mean Gutenberg?

    Customer Support

    Yes that is correct 🙂

    You can add CSS within the HTML but i would advise against that. Its better to add classes to your HTML and the CSS to your child theme style sheet or Customizer > Additional CSS.

    Yes Gutenberg = Block Editor


    Thank you very much, your support is great.

    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.