Tag Info

Hot answers tagged

2

Usually it is bp-legacy-js. But if you place a buddypress.js in wp-content/themes/your-theme/buddypress/js/ this file will be taken instead. The handle will be bp-parent-js The same goes for CSS files, if you place them in /your-theme/buddypress/css/. If you place the buddypress.js in a childtheme, the handle will be bp-child-js.


1

This should work: <?php $script = "<script type='text/javascript'> jQuery( document ).ready( function($) { $(document).ready(function() { $('#particles').particleground({ dotColor: " . json_encode($dotcolor) . ", lineColor: '#5cb9bd', }); ...


1

I've been building an app in Rails that uses react JS heavily. It's a good project to work on because it's giving me the baseline understanding on how React works. Knowing what I know about React, I'd highly recommend not using it with WP until you get a grasp on it initially, I think it'll make your learning process much longer trying to hack it into WP. ...


1

There is a way out, use complete instead of success or done posts = $.ajax({ type: 'GET', url: ajaxurl, async: false, dataType: 'json', data: { action : 'getHotelsList' }, complete: function(results) { and try to remove async:false if problem persists


1

Would you please try below code to your plugin page. if the script file is your plugin root directory. function plugin_adding_scripts() { wp_register_script('my_test_script', plugins_url('testscript.js', __FILE__), array('jquery'),'1.1', true); wp_enqueue_script('my_test_script'); } add_action( 'wp_enqueue_scripts', 'plugin_adding_scripts' );


1

First of all, you should declare your scripts using wp_enque_script. Second, jQuery is loaded automatically in WordPress and is set to no conflict mode. See the documentation for how to link a script that depends on jQuery. Lastly, if you want it to appear on just one page you have two options In your functions.php file add a custom field to either ...



Only top voted, non community-wiki answers of a minimum length are eligible