How wp_ajax_nopriv since WordPress 3.1

Site you referred to is likely being updated in automated fashion. The reason it wrongfully claims that action is deprecated is because: you are looking at page for wp_ajax_nopriv_{$_POST[action]} while in recent WP versions actual code is wp_ajax_nopriv_{$_REQUEST[action]} (also documented on that site). So action is not deprecated, its functionality is not changed (only the … Read more

Retrieve and display data from custom db table in admin area?

Working code for adding widget to wp dashboard with information from custom DB: /** * Add application widget to the dashboard. */ function addApplicationWidget() { wp_add_dashboard_widget( ‘submitted_applications’, ‘Submitted Applications’, ‘showApplicants’ ); } add_action( ‘wp_dashboard_setup’, ‘addApplicationWidget’ ); function showApplicants() { global $wpdb; $appTable = $wpdb->prefix . “applications”; $query = $wpdb->prepare(“SELECT * FROM $appTable WHERE %d >= … Read more

How to translate month names in “Archives”

if the translation is only for the archive widget, a filter function might work (to be added to functions.php of the theme): add_filter(‘get_archives_link’, ‘translate_archive_month’); function translate_archive_month($list) { $patterns = array( ‘/January/’, ‘/February/’, ‘/March/’, ‘/April/’, ‘/May/’, ‘/June/’, ‘/July/’, ‘/August/’, ‘/September/’, ‘/October/’, ‘/November/’, ‘/December/’ ); $replacements = array( ‘jan’, ‘feb’, ‘mar’, ‘apr’, ‘may’, ‘jun’, ‘jul’, ‘aug’, ‘sep’, … Read more

enqueue script on custom post type archive page

You can save your time and server load by not using wp_register_script and wp_register_style when you don’t need them definitely. wp_enqueue_style and wp_enqueue_script do the same job themselves when not involving excessive functions. Here is easier and more readable code up to date with the accepted answer by @vancoder: <?php function opby_theme() { wp_enqueue_script( ‘responsive-img’, … Read more

Is there a way to create invisible pages?

Hi @mafutrct: There are a lot of ways to do this; picking one is actually the challenge! I’m going to suggest a few options and let you explore (the ones at the top look most promising): Page Protection Plugin Password Protect enhancement Plugin Better Protected Pages Simply Exclude Plugin (Article) Hide Pages Plugin Creating ‘hidden’ … Read more