How to add wp_editor Dynamically

Add this to your php file wp_enqueue_editor(); Add this on your script after you load the wp_editor elements to your web page. tinymce.execCommand( ‘mceRemoveEditor’, false, ‘proj_desc’ ); tinymce.execCommand( ‘mceAddEditor’, false, ‘proj_desc’ ); quicktags({id : “proj_desc”});   Source: https://carlofontanos.com/loading-wp_editor-via-ajax/

Read More
WordPress + AJAX

Action wp_ajax Always Returning 0 One of the common reason why this can happen is when the user is not logged in. Try adding the ff: add_action(‘wp_ajax_nopriv_extract-files’, ‘extractFiles’); Also, when you’re using jsonP, you cannot use type POST

Read More
How to Use WP Cron

Scheduling an event in WordPress is very common. This functionality is commonly known as CRON. Here are the steps on how to can create CRON tasks. Step 1: Determine the desired recurrence There are three predefined recurrences defined by WordPress, namely: daily, twicedaily, & hourly. If you want to define your own recurrence, you can

Read More
How to Create Custom WP Metabox

Default and custom types already have default fields that we can fill in, but what it we need custom data for these post types? In this kind of need, we can opt to create custom metaboxes which will contain custom fields for the desired post types. To make the implementation of a custom metabox easier,

Read More