438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

Hi, I have a problems with Flickr Photostream badge and showcase js slider. So, when document is loading slideshow have all the blocks with photos aligned vertically till Flickr badge is not loading. It seems coz js file slider don’t start working while all the Flickr photos is not loading. It’s looks awful! So, does anybody know ho to solve this issue, I saw a lot of authors have Flickr Photostream on their themes. Thanks for any help.

751 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

How are you loading the files in your wordpress site? There is a right way and a wrong way. What method are you using?

438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

I am using right way. It seems that all third party scripts loading first before my own scripts at the server.

751 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

try moving the third party scripts below the wp_head() function in the header.php file.

438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

CyberShot, thanks for the help, if third party script in the header it’s don’t hang up my own scripts anymore but in this case all Flickr photos will be at the top of the page. It’s problem of all third party scripts except of Google Ads, I think.

751 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot says

can you post a link to the site? It may help to see the issue. You should also paste the code you are using. For example. Wordpress already has jquery. Did you de register the scripts and then enqueue the jquery for your scrpt? Do you have the document.ready() function in your script or are you using the shortcut? I found using the shortcut gives me problems most of the time. What other scripts are you using? Are you running other plugins? have you tried disabling all plugins?

330 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
PaulWinslow says

It really doesn’t sound like your calling in your JS properly.

You should be using a hook to enqueue your scripts whether they’re third party or not. For example..

<?php
function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
    wp_enqueue_script( 'jquery' );
}    

add_action('wp_enqueue_scripts', 'my_scripts_method');
?>

You should have something like this in your functions.php file.

It also sounds like you might be hardcoding the third-party code into your header.php file? And if you’re releasing a theme for sale it’s not a good idea to hardcode like that.

3247 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

It really doesn’t sound like your calling in your JS properly.

You should be using a hook to enqueue your scripts whether they’re third party or not. For example..

<?php
function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
    wp_enqueue_script( 'jquery' );
}    

add_action('wp_enqueue_scripts', 'my_scripts_method');
?>

You should have something like this in your functions.php file.

It also sounds like you might be hardcoding the third-party code into your header.php file? And if you’re releasing a theme for sale it’s not a good idea to hardcode like that.

^that

also make sure your using jQuery no conflict

438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says
More right will be:
function my_scripts_method() {
    wp_register_script( 'my_script', get_template_directory_uri() . '/js/my_script'.js', array( 'jquery' ) );

    wp_enqueue_script( 'my_script' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
But this script loads after third party script. Third party script should not be at the <head> coz it generates Flickr photos.
3247 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says
function my_scripts_method() {
    wp_register_script( 'my_script', get_template_directory_uri() . '/js/my_script'.js', array( 'jquery' ) );

    wp_enqueue_script( 'my_script' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts_method', 1 );

by
by
by
by
by
by