SOLVED: Flash of Unstyled Content by using Template Shortcodes

For standard elements that I need on several pages, I use templates. I integrate these via shortcode on my pages. I think that’s the sense behind templates and shortcodes. Unfortunately, elements embedded with shortcode cause an unsightly flickering.

With the help of this video you can see it better: https://drive.google.com/file/d/1_0CoooWYUZQYn-VI2t6MyNDZg4nwAimP/view?usp=sharing
(It’s about the two trust elements in the header).

1.) In the first step, I view the website in the Chrome browser.
2.) In the second step I open Firefox.
3.) At the very end, I jump to the home page. Here I have included the trust elements without shortcode for testing. Without shortcode there is no flickering.

I tried with and without Caching-Plugins. Same Problem in both cases.

Hi, i update know to 1.5.2 and the problem is also there :frowning:

Hi,
Do you have the same issue when using template element instead of shortcode element?

No. I write it in step three. All ist good without shortcode.

You don’t say in step 3 if you include elements via Template element or by inserting template content via template window.
Just trying to isolate a bit more :wink:

Sorry, I misunderstood you. I thought you meant the standard elements. Template element makes no sense to me. I have the element in very many places and want to be able to edit it in one central place.

I can try if the problem occurs with Template Elements too, but it wouldn’t solve the problem for me. I don’t want to look through 500 pages every time I make a change and put the new template element everywhere :smiley:

Well you should check the documentation, template element is exactly meant for this. Again, it is different from inserting the template content itself.
And it is much easier than shortcode, since you select the template in a dropdown :wink:

1 Like

Ok thanks. I did not know that. I thought that templates are impractical in this case because they are not updated on all sites. I will give it a try.

@yankiara
I tried it, but for my purpose it makes more sense with shortcodes.

Imagine I embed the template on 500 pages and find a spelling mistake. Then I have to replace the template on 500 pages. If I use a shortcode, then I only need to correct the spelling error in one place.

Do you understand what I mean?

Well you don’t seem to understand that template element acts as the shortcode: you insert it, select the template, and it will be a reference to the template, not the template content itself.

Later on, if you edit the source template, modifications will appear wherever you inserted the template element.

Look for the template element in the “plus” popup elements list.

1 Like

Oh wow, never seen that “Template Element”. Your right, i walked with false Import Variant (at the top Import Template). Now i’m smarter, tested it and it works! Thanks a lot.

Hey @stabilo , you have already marked the topic as solved, but:

Are there still issues with the shortcode element?
What exactly is included in the template?

Best regards,
timmse

Hello,
yes, the problem with the shortcodes still exists.

I have tested a few shortcodes, everywhere the same problem.
Example:

image

As of the latest release 1.10.3 this is now an issue when:

  1. Using the Template Element :frowning_face:
  2. Using the template via a shortcode

Any suggestions to work around ?

Hi,

we are aware of it, but there is currently no simple workaround for it, except if you can add styles manually in the header, like it’s suggested on following post:

Once the bug will be solved, we will also update that topic.

Best regards,
M