Tag Info

New answers tagged

0

To load your single.php template, first you need to move your functions.php code <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="entry-content"> <?php the_content(); ?> </div> ...


0

It seems like that your result is not being unserialized. try: $options = get_option("kaipo_plugin_options"); $unserialized_options = maybe_unserialize($options); print_r($unserialized_options, true);


0

First change the theme to wordpress default. If it continues after that go ahead and rename your plugins folder to xplugins (use FTP or Cpanel/Plesk). If it disappeared after that then you surely knows something is wrong with a plugin. Now go ahead and rename the folder to original and go through plugin by plugin renaming each until you get to the ...


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 ...


0

http://codex.wordpress.org/Javascript_Reference/wp It's a work in progress. Contribute if you can!


0

Is this something you wish to achieve? <!DOCTYPE html> <html> <body> <h1>My First JavaScript</h1> <button type="button" onclick="var the_id=document.getElementById('my_field').value; document.getElementById('demo').innerHTML= document.getElementById(the_id).innerHTML;"> Click me to display some ...


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

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

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. ...


0

So far the only solution I've come up with is creating a function that postMessages the event into the iframe (using customize_controls_enqueue_scripts hook). As for the receiver in iframe (hooked on customize_preview_init hook) I think it could still need some optimization because I'm getting a weird issue with window.addEventListener('message',* getting ...


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', }); ...


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.


0

Hover will work on mobile so you should not use it. Try and leverage the existing functionality of the bootstrap navbar, it has a built-in "collapse" button: Bootstrap Navbar The "collapse" button is hidden on desktop and by default will only show once you shrink the browser viewport width below 768 pixels. <button type="button" class="navbar-toggle ...


0

In stead of explaining this here again,please check this tutorial and go step by step http://unserkaiser.com/blog/2013/10/08/how-to-move-wordpress-core-javascript-to-the-footer/ If you are facing any difficulties,let me know.


0

This is always a problem when using a plugin that loads extra css/js files. You could add custom fields to the pages where you want to exclude css and js files (called something like page_exclude_css and _js), with comma separated style and script handlers as it's values. Then you add a function to to the wp_enqueue hooks (at a position like 9999) that ...



Top 50 recent answers are included