adding firstname and lastname on registration

The user_register action hook only passes 2 parameters and your callback requires 3, which will result in a PHP fatal error. You should instead be using the insert_custom_user_meta filter like so: class FootballPoolRegisterNames { public static function init_extension() { … add_filter( ‘insert_custom_user_meta’, [ __CLASS__, ‘insert_custom_user_meta’ ], 10, 4 ); } … public static function insert_custom_user_meta( … Read more

search by meta field in the regular WordPress admin panel search

For regular admin panel search you should include “is_admin()” to be true. For checking for specific post type you should check from $query->get(“post_type”) Can you try to use this code add_action(“pre_get_posts”, function ($query) { if ($query->is_main_query() && is_admin() && in_array($query->get(‘post_type’), array(‘company’))) { $s = get_search_query(); $meta_query = [ ‘relation’ => ‘OR’, [ ‘meta_key’ => ‘_company_inn’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)