WP plugin calls for custom pages

You don’t have to “include” plugins. Plugins operate, or should operate, by means of the extensive “hook” system built into WordPress core. Once activated, a plugin should not require much else (with a few exceptions for very complicated plugins). What you need to do is make sure that you are using the appropriate Core functions … Read more

Create 2-layered dropdown menus for custom taxonomy and custom post type

With a combination of jQuery / JavaScript and WP AJAX; you could look for an onchange event on the select box, send an ajax request to your admin-ajax.php with the year and then do a custom WP Query to return the html for the secondary drop down and append it to your dom. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_%28action%29 http://api.jquery.com/jquery.ajax … Read more

How to check which submission button was clicked?

The function submit_button() does generate: <input type=”submit” name=”submit” id=”submit” class=”button button-primary” value=”Save Changes” /> As seen on the codex documentation page. Which gives you the possibility to check for a $_POST or, depending on the form, $_GET or generic $_REQUEST variable – to be exact for $_POST[ ‘submit’ ] or $_GET[ ‘submit’ ] or $_REQUEST[ … Read more