• Resolved absoluteweb

    (@absoluteweb)


    Hi,

    If the animation is applied to a block in a content template (Element) of the GeneratePress theme, the animation or sometimes the block is not displayed when the page associated with the template is displayed.

    This may be because the elements required for animations are not loaded in the page whose content is managed by the GeneratePress template.

    Animation rendering works in template editing.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support irinelenache

    (@irinelenache)

    Hi @absoluteweb,

    Thank you for contacting us!

    Can you please share some screenshots (or a screen recording) that better indicate the issue you are encountering? It would help us investigate this further and come up with a solution.

    Best regards,

    Irinel

    Thread Starter absoluteweb

    (@absoluteweb)

    Hi Irinel,

    I found a trick to make this work by trying to make a video of the problem.

    With GeneratePress, a Content Template replaces the content of the selected location (a page, an article, all pages of a content type, etc.).

    If you add an animation to the Content Template, it won’t work in the destination content because the animation isn’t detected and the necessary files aren’t loaded.

    The trick is to add any animation to the target content, even to an empty paragraph. In this case, the animation files are loaded and the Content Template animations are executed.

    I still need to find a solution for loading animation files in the single template of a custom content type.

    Thread Starter absoluteweb

    (@absoluteweb)

    <style id="o-anim-hide-inline-css"> .animated:not(.o-anim-ready) {
    			visibility: hidden;
    			animation-play-state: paused;
    			animation: none !important;
    		 }</style>
    		 <noscript><style>.animated { visibility: visible; animation-play-state: running; }</style></noscript><link rel='stylesheet' id='otter-animation-css' href='https://xxxxxxxxx/wp-content/plugins/blocks-animation/build/animation/index.css?ver=100a7b303f102afcb05b' media='all' />
    
    <script src="https://xxxxxxxxx/wp-content/plugins/blocks-animation/build/animation/frontend.js?ver=100a7b303f102afcb05b" id="otter-animation-frontend-js"></script>

    This is the missing code when the animation is only in the Content Template of the GeneratePress element.

    This is the code I need to force into the single content of my custom content for the Content Template animations to work.

    Thread Starter absoluteweb

    (@absoluteweb)

    After investigation, the source of the problem is in this source code of the plugin:

    if ( is_singular() && strpos( get_the_content( null, false, $post ), '<!-- wp:' ) === false ) {
    			self::$can_load_frontend = false;
    		}

    To determine whether the animation files should be loaded, you check whether the content contains a block tag. When using a GeneratePress Element Content Template, the target content may be empty, as it will be replaced by the template content, the test fails and the animation files are not loaded.

    Contrary to my previous answer, you don’t even need to add an animation to the target page, just a comment such as:

    <!-- wp:-->
    Plugin Support AndreeaR

    (@andreearadacina21)

    Hello @absoluteweb,

    We appreciate your cooperation in reporting the issue you’re encountering. We are sorry for the inconvenience, and we have confirmed the problem. A bug report has been created and forwarded to our product development team for review.

    What happens next?

    Our product team will evaluate the impact of this issue compared to other open bugs and upcoming features, and assign a priority level to the bug report.

    Our developers prioritize the highest-priority issues first, so we cannot provide a specific timeline for resolution at this time.
    If you have any additional information that may assist with prioritization or resolution, feel free to reply to this email.

    We will update you once the issue is addressed and a fix is released. You may also check the product’s changelog for updates and fixes included in each release.

    If you have any additional questions or concerns, please feel free to create another post. Again, we apologize for the inconvenience and thank you for your patience.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Does not work in a GeneratePress Content Template’ is closed to new replies.