Home>Support>Delayed animation of SiteOrigin Hero within Custom Sidebars and Page Builder

Delayed animation of SiteOrigin Hero within Custom Sidebars and Page Builder

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

First of all: Happy New Year to all. And thank you to SiteOrigin for a great set of widgets!

I am putting am animated series of Hero frames with Buttons on my home page by means of a SiteOrigin Custom Sidebar widget. Inside the widget I hvae a Layout Builder and with that I have the SiteOrigin Hero widget. This works perfectly, except for the fact that there is a huge delay before the animation of the various Hero frames starts. Once the animation starts, the timing works as I have it set up. In fact, I maintain the default settings (time out between frames: 8000ms). But the first delay before the animation starts is about 10 times as long!

Interestingly enough, this issue does not occur when I apply the Hero widget directly on a page, so without the Custom Sidebar route.

For those wondering how I put the Custom Sidebar widget onto my home page: I have this PHP code in my index.php:

<?php if ( is_home() && !is_paged() ): ?>
<?php dynamic_sidebar( 'widget-home-top' ); ?>
<?php endif; ?>

Does anyone understand what it is I am doing wrong or how I could solve this?

Many thanks in advance!
Seb

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 6 months ago LekkerPuurEten

    I am still struggling with this. Is there no one at SiteOrigin or maybe another user who has an idea or a suggestion?
    Any help would be greatly appreciated!

  2. 9 years, 6 months ago Support Assistants

    Hi Seb

    Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.

  3. 9 years, 6 months ago Private Message - LekkerPuurEten

    This is a private message.

  4. 9 years, 5 months ago LekkerPuurEten

    Dear SiteOrigin Support Assistants,
    I would appreciate if you could have a look at this problem.
    Thanks.

  5. 9 years, 5 months ago Support Assistants

    Thanks for the wait. We’ve seen this delay once in the past but I don’t believe we located the cause. It might be a JavaScript challenge with the jQuery plugin, Cycle. Have you perhaps tried running a plugin conflict test to see if a JavaScript conflict might be involved? Also, is there any change if you use another theme? These two troubleshooting options OR shifting to another slider widget like Meta Slider are, unfortunately, the two options I can think of at the moment.

  6. 9 years, 5 months ago LekkerPuurEten

    Thanks very much for your reply.

    I have ran a plugin conflict test and there seems there is no Javascript conflict involved.

    Changing to another theme isn’t really an option for this specific site.

    I did experiment with Meta Slider as well as with HUGE-IT slider. Interestingly enough, both those sliders also have certain issues when being applied within a SiteOrigin Custom Sidebar widget! The issues are different to the one when using the SiteOrigin Hero, but still. And, like with SiteOrigin Hero, all is well when any of the sliders is applied without the Custom Sidebar widget.

    Which gave me an idea and a resulting question: I am only using the widget route because I want to maintain my theme’s standard home page, which I have modified with the code shown above. Now, the other two sliders allow the use of a shortcode. So, with those I can solve the problem by doing something like the following:

    <?php if ( is_home() && !is_paged() ): ?>
    <?php echo do_shortcode("[huge_it_slider id='1']"); ?>
    <?php endif; ?>

    Problem solved? Well, not entirely. Why? Well, thing is, I like SiteOrigin Hero better! Yeah!!! :-)

    Unfortunately, I don’t think Hero provides a shortcode option. Correct?

    So, my question: Can you think of an alternative for the code above to implement the SiteOrigin Hero slider without the use of the widget. That would solve my above problem, I am sure.

    Thanks again, for a great tool set and for your support!

  7. 9 years, 5 months ago Support Assistants

    You might try:

    https://codex.wordpress.org/Function_Reference/the_widget

    The class should be:

    SiteOrigin_Widget_Hero_Widget
  8. 9 years, 5 months ago LekkerPuurEten

    That’s an interesting thought. But if I understand this function refenrence correctly, then I can not refer it to a pre-defined Hero Widget, as that can only be done in a sidebar ()And referencing to a sidebar is what does not work, see problem statement above).

    So, that does mean that the following is not enough:

    <?php the_widget( 'SiteOrigin_Widget_Hero_Widget' ); ?>

    The following also does not work (understandably):

    <?php the_widget( 'SiteOrigin_Widget_Hero_Widget', 'widget-home-top' ); ?>

    In my understanding, it would require something of the following form:

    <?php the_widget( 'SiteOrigin_Widget_Hero_Widget', $instance, $args ); ?>

    But it is not clear to me what to use as $instance and $args. Those would need to define the complete Hero Widget (which seems far too much information to put into these two arguments). This link describes how to do that for the standard WP widgets. Is there a page that describes how to do that for the SiteOrigin widgets?

    Or did I misunderstand/misinterpret your suggestion?

    Thanks!!!

  9. 9 years, 5 months ago Support Assistants

    Quite right, apologies. Thanks for running through this idea with me.

  10. Can you think of an alternative for the code above to implement the SiteOrigin Hero slider without the use of the widget.
  11. Going on our research above, no, we’d need to use a widget area.

    It’s a bit complicated but another idea might be to use SiteOrigin Page Builder for your home page. You could add the slider widget and then a Post Loop widget to pull your posts. The Post Loop widget looks for templates as follows:

    *-content.php
    content-*.php
    *-loop.php
    loop-*.php
    

    If you created a blog-loop.php file in your child theme and added the blog layout to it, that template would be available for selection the Post Loop widget.

  • 9 years, 5 months ago Support Assistants

    Example from our Vantage theme: https://themes.svn.wordpress.org/vantage/1.4.4/loops/loop-blog.php

  • 9 years, 5 months ago LekkerPuurEten

    Hi guys,
    I actually seem to have found a way to solve this. Not so much by re-building the home page of my theme. I have create a new page with only the SiteOrigin Hero widget inside SiteOrigin Page Builder, so without the SiteOrigin Custom Sidebar widget. I then include the content of that page (in my case that page has the id=123) into the index.php of the theme that I use (which is the excellent Hueman). And that has solved my problem!

    So, instead of putting the previous code:

    <?php if ( is_home() && !is_paged() ): ?>
     <?php dynamic_sidebar( 'widget-home-top' ); ?>
    <?php endif; ?>

    I now put:

    have_posts() )
    {
    $the_query->the_post();
    if($title==true) the_title();
    the_content();
    }
    wp_reset_postdata();
    endif;
    ?>

    Again, this seems to solve the issue and to provide a user-friendly way to add content to your theme’s standard pages!

    Question: does anyone feel that this affects SEO in any way?

    Thanks for the discussion, guys! And keep up the good work with these widgets!!! :-)

  • 9 years, 5 months ago LekkerPuurEten

    Somehow some content got messed up when I posted my last post, so let me retry (feel free to delete the previous one):

    Hi guys,
    I actually seem to have found a way to solve this. Not so much by re-building the home page of my theme. I have create a new page with only the SiteOrigin Hero widget inside SiteOrigin Page Builder, so without the SiteOrigin Custom Sidebar widget. I then include the content of that page (in my case that page has the id=123) into the home page of the theme that I use (which is the excellent Hueman theme) with some PHP. And that has solved my problem!

    So, instead of putting the previous code into index.php:

    <?php if ( is_home() && !is_paged() ): ?>
     <?php dynamic_sidebar( 'widget-home-top' ); ?>
    <?php endif; ?>

    I now put:

    <?php
     if (is_home()&&!is_paged()):
      $my_id = 382;
      $the_query = new WP_Query( 'page_id='.$my_id );
      while ( $the_query->have_posts() )
      {
       $the_query->the_post();
       if($title==true) the_title();
       the_content();
      }
      wp_reset_postdata();
     endif;
    ?>

    Again, this seems to solve the issue and to provide a user-friendly way to add content to your theme’s standard pages!

    Question: does anyone feel that this affects SEO in any way?

    Thanks for the discussion, guys! And keep up the good work with these widgets!!! :-)

  • Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

    Get The Most Out of SiteOrigin with SiteOrigin Premium

    Find Out More