• We have a non-looping animated .gif as the Home page header image, and it is intended to be non-looping.
    But we now want it to replay/restart if the page is refreshed.

    On searching for solutions, I see that if the site was written in native HTM we could use javascript to append a random number to the image e.g.

    img.src = "your_image_url.gif"+"?a="+Math.random();

    But it’s WordPress, so we can’t edit the inline code(or can we?).

    We have the scripts&styles app already installed, can we do something here?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    You can have inline script, but not entered through the editor. The editor will corrupt code syntax. You could output JavaScript within a <script> block via PHP from the “wp_head” action, but the scripts&styles plugin ought to be able to accommodate such code as well. I’ve no experience with that plugin. If you want to go that route and need further assistance, I recommend asking in their dedicated support forum where its devs and expert users are in the best position to help you.

    Thread Starter gretche

    (@gretche)

    Thank you – great suggestion.
    I’ve created a new topic here:
    https://www.ads-software.com/support/topic/how-replay-an-animated-gif-header-image-on-refresh/

    I didn’t know how to ‘move’ this topic … so I thought of contacting a moderator to ask … then I saw you WERE a moderator … so created a new topic. If it was wrong to do so, please let me know.
    Once again, thanks for your suggestion – much appreciate.

    Moderator bcworkz

    (@bcworkz)

    ?? Yeah, there’s no way you can move topics. In fact, I cannot even move topics to plugin support forums, only within the main forums. I’m supposed to be able to, but it doesn’t work with my login. In any case we generally ask members to create new topics instead of just moving so people learn the best way to ask for help when specific plugins are involved. So it’s all good!

    To keep further replies in one place, I’m closing this topic. Anyone else who might be able to help can follow the link you provided. I hope you’re able to find a solution soon!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How replay an animated .gif header image’ is closed to new replies.