How to define variables in WordPress AJAX?

If you mean when you access you variables in JS code just by name they are really undefined in JavaScript environment. In order to access variables in JS you need to type as in your example www_vars.whichcats instead of just whichcats Also it’s good to understand how wp_localize_script works. First param is your js file … Read more

cmb2 select option output [closed]

If you need to display select options value rather then key then you have to use an options callback function for this. like this, add_action( ‘cmb2_admin_init’, ‘your_function_name’ ); function your_function_name() { $prefix = ‘your_prifix_’; /** * Sample metabox to demonstrate each field type included */ $cmb = new_cmb2_box( array( ‘id’ => $prefix . ‘metabox’, ‘title’ … Read more

.htaccess for Subdomain and Subfolder w/SSL

Typically if your subdomain’s root is the folder with WP installed, then just create a .htaccess file there. That always works for me. Example: public_html -> random etc.. mywpfolder (the wp folder) wp-admin wp-content etc.. .htaccess (create htaccess file here or simply copy/paste the primary one here) EDIT Do you have the other installs in … Read more

Custom Post Type Trouble

you likely need to do a flush re-write. go to settings/permalinks in the dashboard and click save. You’ll be good to go. In the future you can add this directly to your CPT plugin. I would suggest getting a bit more creative with your naming though so you don’t have conflicts later.

Add woocommerce plugin in own theme

You can copy the templates folder inside the Woocommerce plug-in folder and place them in a custom Woocommerce folder inside your theme folder. every changes you make inside the custom Woocommerce folder will override the core files of the Woocommerce plug-in without loosing them after an update. You have to give us more information aboutdisplaying … Read more