Add Tag to post after publishing
Add Tag to post after publishing
Add Tag to post after publishing
How to create a user ability to save pages with full url?
I found a solution: function myAction() { if(defined(“REST_REQUEST”) && REST_REQUEST) { return; } // Do action stuff } The request to /wp-json/wp/v2/pages/1373 is a request to the API which defines the constant REST_REQUEST and sets it to true. If anyone’s got an idea why an extra API request is sent, please feel free to add … Read more
Bookmarking custom template pages which all have the same page ID
On input, esc_url_raw() is the correct function to use which replaces sanitize_url Example : $custom_field = esc_url_raw( get_post_meta( get_the_ID(), ‘_custom_url’, true ) );
As you say, when triggered ‘save_post’ the changes are not been mae, so there’s not yet an association with a term. But..in the $_POST[‘product_cat’] variable you have the array (IDS) of the selected categories, so you can check if the product belongs to the ‘Keyboard’ category ( based on its ID) and decide whether or … Read more
Select input in metabox not updated
Save / Update meta data as multidimensional array
Updating failed. The response is not a valid JSON response. specific to my browser when I include javascript in my html
remove_action(‘save_post’) in function that was triggered by save post not working