How to use wp-ajax in wp-cron

First of all, think about using the new REST API instead of Admin-AJAX in your environment where JavaScript is available. Now to answer your question: JavaScript isn’t available for wp-cron, as these requested solely run on the server and not on some interpreted HTML/JavaScript. So what can you do? Well, just schedule another event if … Read more

Adding dynamic section to WordPress

There are a few approaches to this that could work. If you look around here for questions regarding “virtual pages” you might find some options that could work for you. One quick way to implement this- 1) Create a page under Pages in WordPress admin. This will be the page that’s loaded in the main … Read more

Add jQuery to WordPress page

I think wordpress only loads jQuery when you specify it is a dependency for another script that is loading on that page: wp_enqueue_script( ‘script-name’, ‘/path/script.js’, array(‘jQuery’); If there is no other script then try loading it like a normal script with full path to the file: wp_enqueue_script( ‘myJquery’, ‘//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js’);

Remove from Google Tags with less than 2 posts

You can use http://php.net/manual/en/function.http-response-code.php to set the response header, and you just need to find the lines in the theme’s header.php. Unfortunately, these items are set by header.php so you will have to run the code on all pages of a traditional theme, but I would do something in the header.php near where the meta … Read more

Access wordpress functions inside a plugin class

In WordPress, most of the functions won’t get loaded until certain points in the event stack. In the Event Driven Architecture [EDA] of WordPress, you have to put your classes into actions or filters. class MyGreatClass{ public function __construct(){ //I can use WP functions here } public function myGreatMethod(){ return “I don’t do much, but … Read more

WooCommerce plugin appearance and look [closed]

It certainly is possible – take a look at the woocommerce documentation: http://docs.woothemes.com/document/css-structure/ http://docs.woothemes.com/document/template-structure/ You can find the information you need there.