PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Unable to change ajax spinner url

  1. bluantinoo
    Member

    HI,
    I'm trying to change the default spinner.gif url of ajax paged forms.
    I'm using this few lines at the bottom of my functions.php theme file:

    add_filter("gform_ajax_spinner_url", "spinner_url", 10, 2);
    function spinner_url($image_src, $form){
        return  get_bloginfo('template_directory') . '/images/loading_bar.gif' ;
    }

    but it does not work.
    any idea?

    Posted 12 years ago on Saturday September 15, 2012 | Permalink
  2. Can you see the URL which is actually returned for the gif? Maybe the URL is wrong and returns a 404? Can you try hard coding the URL to the site, theme, or child theme, and see if the image works at that point?

    I think I would hard code the full URL to the gif (after making sure I could load it in a browser) and see if the function works as expected. If it does, then go about getting the proper function to return the URL to the theme or child theme.

    Also, if you post a link to your site we can take a look for you.

    Posted 12 years ago on Sunday September 16, 2012 | Permalink
  3. bluantinoo
    Member

    Hi Chris,
    thanks for reply

    actually hardcoding the URL works... but strange, how "get_bloginfo('template_directory') " could be wrong?

    sorry the site is not already published so I cannot give the url, when I will publish I will surely do it to show my implementation of GF :)

    Posted 12 years ago on Monday September 17, 2012 | Permalink
  4. At least you found out what the problem is. What does get_bloginfo('template_directory') return? If you're using a child theme, this function call will return the URL of the parent directory.

    Posted 12 years ago on Monday September 17, 2012 | Permalink