Tutorials for Developers & Sysadmins

Step-by-step guides for the work we actually do — Laravel, PHP, WordPress, MySQL, Linux servers, and the occasional rabbit hole. Every command has been run on a real machine; nothing is theoretical.

How to Deregister or Remove a CSS File in WordPress (wp_dequeue_style Not Working)

WordPress wp_dequeue_style not working? Bump hook priority to 9999 so your dequeue runs after plugin enqueues. Finding handles, replacing with…

how7o

How to Get Posts by Date Range in WordPress

WordPress posts by date range via date_query in WP_Query or pre_get_posts. Covers after/before, inclusive, calendar parts, OR relation, and the…

how7o

How to Change a User Profile Picture in WordPress Without a Plugin

WordPress custom avatar no plugin: media-library uploader on user profile + user meta + get_avatar filter. Full functions.php + uploader.js…

how7o

How to Apply pre_get_posts on Custom Post Types in WordPress

WordPress pre_get_posts custom post type: scope the hook with is_post_type_archive or post_type query var. Mandatory guards, merge meta_query/tax_query.

how7o

How to Display Different Menus to Logged-In Users in WordPress

WordPress logged-in menu: register two nav locations and pick via is_user_logged_in() ternary. Plus the wp_nav_menu_objects filter for lighter item-level swaps.

how7o

How to Disable Revisions and Autosave in WordPress

WordPress disable revision with WP_POST_REVISIONS false + AUTOSAVE_INTERVAL in wp-config. Per-post-type via wp_revisions_to_keep filter, plus WP-CLI cleanup.

how7o

How to Retrieve the Last Inserted Row ID in WordPress

WordPress wpdb insert_id: read after $wpdb->insert() or $wpdb->query('INSERT ...'). Bulk-insert semantics, safety checks, and why it replaces mysql_insert_id.

how7o

How to Prepare a %LIKE% SQL Statement in WordPress

WordPress prepare LIKE: use %s in the query and wrap the value with % wildcards. Covers esc_like() for user input,…

how7o

How to Order Posts by Meta Value in WordPress

WordPress order posts by meta value with meta_key + orderby=meta_value_num in WP_Query or pre_get_posts. Including no-meta posts with EXISTS/NOT EXISTS.

how7o

How to Search Users by Multiple Fields in WordPress

WordPress search users across user_login, email, display_name via WP_User_Query search_columns. Add meta_query for first_name / last_name, plus pagination.

how7o