Where do I put the code snippets I found here or somewhere else on the web?

Whenever you find a piece of code without clear installation instructions it is probably a plugin. The example you gave is a good one, because that is the most common case: add_action(‘template_redirect’, ‘remove_404_redirect’, 1); function remove_404_redirect() { // do something } To use such a snippet, put it into a plugin: Create a new file, … Read more

Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?

You put your value JS variable that you created in the data that gets sent to your php function via ajax like: var data = { ‘action’: ‘get_etim’, ‘whatever’: ajax_object.we_value, ‘select_value’: value }; Then in the php function that Ajax sends to you can use select_value the same way you used whatever in your code … Read more