jQuery.accordion isn’t a function even when enqueued

The 3rd parameter in the call to wp_register_script() should be an array of dependencies – not a string. Change this: wp_register_script(‘fl-custom-js’, get_template_directory_uri() . ‘/faq/faq.js’, ‘jquery-ui-accordion’, ”, true); To: wp_register_script(‘fl-custom-js’, get_template_directory_uri() . ‘/faq/faq.js’, array(‘jquery-ui-accordion’), ”, true);

Removing jQuery from footer

If your working with a blank theme why don’t you just remove or comment out the wp_enqueue_script(‘jquery’); in the theme functions.php? Otherwise your action hook is wrong, use, add_action(‘wp_print_scripts’,’theme_slug_dequeue_footer_jquery’); function theme_slug_dequeue_footer_jquery() { wp_dequeue_script(‘jquery’); } This will still load the build in jQuery (I think) in /wp-includes/js/jquery/jquery.js?ver=1.8.3 To remove all jQuery from the admin & the … Read more

Move jQuery to the bottom of the page whilst keeping the WordPress jQuery

You can change it by calling add_data method of $wp_scripts object. This object holds all scripts and information how to render it. To force rendering script in the footer you can do it like this: add_action( ‘wp_enqueue_scripts’, ‘wpse8170_enqueue_scripts’ ); function wpse8170_enqueue_scripts() { $GLOBALS[“wp_scripts”]->add_data( ‘jquery’, ‘group’, 1 ); } P.S.: I haven’t tested it, but suppose … Read more

Unwanted content in website title

I doubt WordPress would be putting a url like you mentioned ‘www.domain.com/…’ in title tags either way. Are you sure you’re that’s where it’s showing up? The hash in the url is likely just for slider functionality. You could try a different slider or ignore it, since it doesn’t affect anything.

Add a class to posts in increments of 2

Filter post_class, use a static internal counter in the filter callback: add_filter( ‘post_class’, ‘wpse_100804_post_class’ ); function wpse_100804_post_class( $classes ) { static $counter = 0; $counter += 1; switch ( $counter ) { case 4: $counter = 0; case 3: $classes[] = ‘extra’; } return $classes; } In your loop template call post_class() like this: while … Read more

Dealing with a library that depends on jQuery

First of all if you investigate PikaChoose source code, then you will see that it wraps the code with self invoking closure: (function($) { // … })(jQuery); It means that they use short form properly. In the same time it means that all you need to do is to enqueue jQuery and PikaChoose scripts and … Read more

`wp_editor()` CSS messing up the jQuery Dialog

Yeah this is a fun one had to make some mods to make this one work…. add this to your theme stylesheet (style.css): .ui-front { z-index: 1001 !important; } .ui-widget-overlay { background: none repeat scroll 0 0 #000000 !important; opacity: .6 !important; filter: Alpha(Opacity = 60) !important; } This should override the editor.css. Let me … Read more

Masonry and Jetpack Infinite Scroll – overlap issue

I have now solved point (2), the overlapping posts problem; maybe this will help someone else. I changed wrapper to true in the mytheme_jetpack_setup function in my PHP (so that the new posts are wrapped in their own div) And I changed the jQuery to: $(‘#content’).masonry({ columnWidth: ‘.grid-sizer’, itemSelector: ‘article’, gutter: ‘.gutter-sizer’ }); var infiniteCount … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)