how to add Jquery script to one page?
This url works http://codex.wordpress.org/Function_Reference/wp_enqueue_script and for particular page you can use if( is_page(‘x’)) { ?> // YOUR SCRIPT STUFF <?php }
This url works http://codex.wordpress.org/Function_Reference/wp_enqueue_script and for particular page you can use if( is_page(‘x’)) { ?> // YOUR SCRIPT STUFF <?php }
There are multiple storage mechanisms in WP so it can be bit tricky to pick one and sometimes there is no single right choice. Let’s examine your criteria for storage: persistent (you don’t want data just evaporating) processable (you want to export it and probably navigate) simple to implement (you don’t want go building something … Read more
Try: function eddslider_options_each( $key ) { $edd_slider_options = get_option( ‘eddslider_options’ ); /* Define the array of defaults */ $defaults = array( ‘slider_insert’ => 0, ‘slider_arrows’ => 0, ‘slider_bullets’ => 0, ‘slider_effect’ => ‘fade’, ‘slider_theme’ => ‘default’ ); $edd_slider_options = wp_parse_args( $edd_slider_options, $defaults ); if( isset($edd_slider_options[$key]) ) return $edd_slider_options[$key]; return false; }
The plugin developer might include the changes into the core plugin if you submit the changes or offer a patch. You can’t be the only one out there with the issue.
I would consider installing Jetpack and activating the Email Subscriptions module.
As long as… You use $wpdb->prefix (or $wpdb->base_prefix) to prefix the table Your table name is someplace public, and easily available for other plugins, themes and end users to use and extend I would say either setting the table as a property on $wpdb or using a constant is fine. If you choose to use … Read more
If you are looking to insert code into the <head></head> block, then this hook does it: add_action( ‘wp_head’, ‘wpse_73900_wp_head’ ); function wpse_73900_wp_head() { ?> <!– Custom Html —> <?php } If that’s not the case, then it’s more difficult. I think it would depend on the theme providing a hook at your desired point of … Read more
No, the column must exist before you insert data into it. Otherwise the query will fail. You should edit your table creation SQL query to accommodate the new column. Then, run it through dbDelta() again. dbDelta() will compare your query and the table structure and only create the missing columns. The best way to tell … Read more
The woocommerce_clean function: return trim( strip_tags( stripslashes( $var ) ) ); is pretty much going to stip out any html. You may be able to use core WordPress sanitize and escaping functions, but no guarantee how WooCommerce is going to react. Take a look at Data Validation docs on the WordPress Codex for other options. … Read more
You should limit your helper functions. In a rather big plugin I am writing currently (~50 classes) I have just three helper functions, placed in the plugin main file: /** * Delete plugin option on deactivation. * * @return boolean */ function t5_delete_option() { return delete_site_option( ‘plugin_t5’ ); } /** * Load a class from … Read more