Trying to remove duplicate jquery scripts

When you load jquery from WordPress includes, you will need to use jQuery instead of the dollar sign $, as the latter is reserved for other libraries. jQuery( document ).ready(function( $ ) { // Submitform and colorbox init, both will work here. }); But also make sure to avoid the script tags as much as … Read more

How can I make this custom menu work?

You need to target the appropriate theme_location. Assuming you’ve defined multiple nav menu locations using register_nav_menus() in functions.php: <?php register_nav_menus( array( ‘primary-menu’ => ‘Primary Menu’, ‘secondary-menu’ => ‘Secondary Menu’ ) ); ?> Then you call wp_nav_menu() using the appropriate theme_location as defined above, along with any other relevant arguments, e.g.: <?php wp_nav_menu( array( ‘theme_location’ => … Read more

How I got jQuery Quicksand working with WordPress?

Not sure it is entirely your problem, but you have a syntax error here: <script src=”https://wordpress.stackexchange.com/questions/32648/<?php bloginfo(“template_directory’); ?>js/jquery.easing.js”></script> …you need to add the trailing slash to bloginfo(‘template_directory’), like so: <script src=”https://wordpress.stackexchange.com/questions/32648/<?php bloginfo(“template_directory’); ?>/js/jquery.easing.js”></script> EDIT Looking at your browser source, your loop markup is working properly, but your quicksand script link doesn’t appear to be output … Read more

Multiple jQuery conflict unsure of why

Based off of https://stackoverflow.com/questions/7818525/jquery-image-rotator-with-multiple-instances-on-single-page here is the code that eventually got it to work PHP Top Banner <div id=”top” class=”rotator”> <ul> <li class=”show”><a href=”https://wordpress.stackexchange.com/questions/41048/1″><img src=”http://173.247.253.180/~andrewba/images/banners/40779.gif” /></a></li> <li><a href=”2″><img src=”http://173.247.253.180/~andrewba/images/banners/40780.gif” /></a></li> </ul> </div> Sidebar <div id=”right” class=”rotator”> <ul> <li class=”show”><a href=”https://wordpress.stackexchange.com/questions/41048/1″><img src=”http://173.247.253.180/~andrewba/images/banners/40787.gif” /></a></li> <li><a href=”2″><img src=”http://173.247.253.180/~andrewba/images/banners/40788.gif” /></a></li> </ul> </div> jQuery <script type=”text/javascript”> jQuery( document).ready(function() { //Load … Read more

jQuery ajax call throws an HTTP 302

I’d say, just skip that: cookie: encodeURIComponent(document.cookie) There’s no need to post any cookies on XHR – the browser handles that. Well, how about something like that instead (untested): data:{‘term’:encodeURIComponent($.term)} Most easy is to use FireBug, open Net panel and inspect both HTTP headers.

Intergrating agile carousel to wordpress: how to write the ajax_callback function

So I see you’re referring and attempting to recreate this example: <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/63304/agile_carousel.css”> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.js”></script> <script src=”agile_carousel/agile_carousel.a1.1.js”></script> <script> // Code used for “Flavor 2” example (above) $.getJSON(“agile_carousel/agile_carousel_data.php”, function(data) { $(document).ready(function(){ $(“#flavor_2”).agile_carousel({ // required settings carousel_data: data, carousel_outer_height: 330, carousel_height: 230, slide_height: 230, carousel_outer_width: 480, slide_width: 480, // end required settings transition_type: “fade”, transition_time: 600, … Read more

Ajaxify calendar

Write your required javascript, then use this code to display it on the page, it ensures that the script is only included if the calendar is displayed add_filter(‘get_calendar’, ‘add_calendar_scripts’); function add_calendar_scripts($content) { add_action( ‘wp_footer’, ‘output_calendar_scripts’, 11); return $content; } function output_calendar_scripts() { ?> <script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/70078/<?php echo get_template_directory_uri();?>/path/to/script.js”></script> <?php }

HTML editor accessing quicktag buttons

I wrote a jQuery plugin to check every 0.5 seconds if the toolbar has the requested element. (function( $ ) { /** * Wait until element has finish loading requested elements, then execute callback * @param string element Element to wait for * @param object callback Callback to execute * @param integer timeout Optional timeout … Read more

Override theme style with other CSS on a specific page

You want the plugins style sheet to over ride your themes style sheet conditionally ( on one page). Dequeue your themes style sheet for a specific page conditionally. add_action( ‘wp_enqueue_scripts’, ‘remove_default_stylesheet’, 25 ); function remove_default_stylesheet() { if ( is_page( page id or slug) ) { wp_dequeue_style( ‘original-enqueue-stylesheet-handle’ ); wp_deregister_style( ‘original-register-stylesheet-handle’ ); wp_register_style( ‘new-style’, plugins_url(‘stylesheet.css’, __FILE__) … Read more

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