Debug Tools For WordPress / PHP – current_filter and debug_backtrace

We have already discussed error_log here.  The current_filter() function will return the current WordPress filter or action calling a specific function. The return type is string, so it’s straight forward to just use it. Add the following inside the function

Posted in WordPress Tagged with:

Update WordPress Password via SQL (No phpMyAdmin)

Run this from a plugin or a file that will be executed. global $wpdb; $wpdb->query( “UPDATE wp_users SET user_pass= MD5(‘new-password’) WHERE user_login = ‘known-username'” ); Refer: https://stackoverflow.com/a/23635330/8255629

Posted in WordPress Tagged with: , ,

Remove Website Field From WordPress Comment Form

Remove the website / URL field in WordPress comment form. /** * Remove webiste field from WordPress comment form * * Removes the website field when comments form is displayed with comment_form() * * @since 1.0 */ function velocity_remove_comment_form_website_field( $fields

Posted in WordPress Tagged with: , , ,

Remove Comment Author Link In WordPress Comment List

Add the following code snippet to the functions.php of your theme to remove the links to the comment author website in WordPress comments list. Works when the comments list is generated with wp_list_comments(). /** * Remove comment author link in

Posted in WordPress Tagged with: , ,

Add Custom Post Type To Tag And Category Archive Pages

Here is how to modify the query for default taxonomy archive pages (tag archive page or category archive page) to display custom post types. /** * Add custom post types to the default tag query * * This will make

Posted in WordPress Tagged with: , ,