173 posts
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
Decneo says

Hi, My new theme got soft-rejected and I got this from reviewer : Do not deregister WP’s version of jQuery – delete these lines: http://ivor.bz/43pa ( I thought Picture is example not my file ) So, I tried delete my wp_deregister_script(‘jquery’); but it makes my Jquery not work. My JS load : Click here for image please someone point me out please. Best regards, Decneo

898 posts
  • Has sold $1,000+ on Envato Market
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+5 more
infuse01 says

Hi,

yeah you never should deregister the jQuery from Wordpress. This is a common rejection reason. From the picture you posted I can see nothing. Your Javascript isn’t probably working because any of the plugin files has troubles with the jQuery Version which is included within Wordpress. I would suggest you to debug your theme and use the inspector to find out which script is causing those issues, remove them and replace them with some alternatives.

173 posts
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
Decneo says

Hi, yeah you never should deregister the jQuery from Wordpress. This is a common rejection reason. From the picture you posted I can see nothing. Your Javascript isn’t probably working because any of the plugin files has troubles with the jQuery Version which is included within Wordpress. I would suggest you to debug your theme and use the inspector to find out which script is causing those issues, remove them and replace them with some alternatives.
my picture that I’ve posted it works for me but after delete wp_deregister_script(‘jquery’); then it didn’t work, I debug my theme but no error. :S
898 posts
  • Has sold $1,000+ on Envato Market
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+5 more
infuse01 says
You need to remove both lines:
wp_deregister_script();
wp_register_script();
and include instead
wp_enqueue_script('jquery');

as in the image you posted. If it still doesn’t work there is not much I or someone else can do with only having an image.

173 posts
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
Decneo says

You need to remove both lines:
wp_deregister_script();
wp_register_script();
and include instead
wp_enqueue_script('jquery');
as in the image you posted. If it still doesn’t work there is not much I or someone else can do with only having an image.
thanks for your replied but it didn’t work because the jquery was load via wp_register_script(‘jquery’, “http” ...);

I’ve used this reference : http://css-tricks.com/snippets/wordpress/include-jquery-in-wordpress-theme/

why in this reference they also use wp_deregister_script(‘jquery’);

Best regards, Decneo

898 posts
  • Has sold $1,000+ on Envato Market
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+5 more
infuse01 says

The Reference on css-tricks can be taken into consideration if (and only if) you need it for a custom project. As soon as it gets to stock items that is a pretty different game.

You have probably a bunch of issues with your javascript but as I described above that’s the way to go. First remove those 2 lines and load the default jquery, and if it still get stuck then you should inspect all plugins. Starting with deactivating all Wordpress Plugins you have installed (if you have some installed), and ending with the jquery plugins you have included into your theme. Do not only remove the lines where you load the javascript files but you also need to remove the lines which executes this particular file, because this can also cause some issues.

173 posts
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
Decneo says

The Reference on css-tricks can be taken into consideration if (and only if) you need it for a custom project. As soon as it gets to stock items that is a pretty different game.

You have probably a bunch of issues with your javascript but as I described above that’s the way to go. First remove those 2 lines and load the default jquery, and if it still get stuck then you should inspect all plugins. Starting with deactivating all Wordpress Plugins you have installed (if you have some installed), and ending with the jquery plugins you have included into your theme. Do not only remove the lines where you load the javascript files but you also need to remove the lines which executes this particular file, because this can also cause some issues.
I didn’t use any plugin and not issue with my js, I didn’t understand we use wp_deregister_script(‘jquery’); to De-registers the WordPress stock jquery script, so we can register our own copy or from the Google CDN right? why we can’t use this.
898 posts
  • Has sold $1,000+ on Envato Market
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+5 more
infuse01 says

because it’s a rule, a guide. It’s there to mainstream the development process for plugin and theme developers. If everyone uses another version there would be massive problems with compatibility.

You want to use the newest version of jquery because one of the plugins you’re using requires it. But if your client downloads your theme and tries to use a wordpress plugin which relies on the standard jquery version from WP, there would be many problems and you have more work because people complaining and want their money back and so on. So simply stick with the Wordpress Default and arrange everything at it.

173 posts
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
Decneo says

because it’s a rule, a guide. It’s there to mainstream the development process for plugin and theme developers. If everyone uses another version there would be massive problems with compatibility.

You want to use the newest version of jquery because one of the plugins you’re using requires it. But if your client downloads your theme and tries to use a wordpress plugin which relies on the standard jquery version from WP, there would be many problems and you have more work because people complaining and want their money back and so on. So simply stick with the Wordpress Default and arrange everything at it.
Thank you for your clear answer , I will use Wordpress Default then see if it works or not.
173 posts
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
Decneo says

It works now, the issue is from my js. $conflict mode.Thank you infuse01 now I can use the Wordpress js Default now

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by