439 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
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?

439 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

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

439 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
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?

327 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
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.

3197 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
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

439 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
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.
3197 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
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