Blog

Update user role WP

User how to update user role in wordpress after register Assistant To update a user role in WordPress after registration, you can use the `user_register` action hook. This hook is triggered after a user is successfully registered, providing the user ID. Here’s how you can implement it: ### Example Code Add the following code to […]

Role assignment troubleshooting

User function userwp_user_registration_approval($user_id) { // Update user meta as needed if(is_admin()) return; update_user_meta($user_id, 'aiowps_account_status', 'pending'); update_user_meta($user_id, 'userwp_account_status', '1'); $user = get_userdata($user_id); if ($user) { // Remove the 'subscriber' role if the user has it $user->remove_role('subscriber'); // Assign the 'provider' role $user->add_role('provider'); // Ensure changes are saved wp_update_user($user); } // Schedule the role assignment //wp_schedule_single_event(time() + […]

Frontend User Registration Provider

User register user as provider role from frontend wordpress Assistant To register a user with the **Provider** role from the frontend in WordPress, you can use a combination of: 1. **A custom form for user registration on the frontend**. 2. **WordPress hooks** like `wp_insert_user` or `user_register`. 3. Assigning the **Provider** role during registration. ### Steps […]

Add CSS to CPT

User add css on single page custom post type using hook Assistant To add CSS to the single page of a custom post type in WordPress, you can use the `wp_enqueue_scripts` action hook combined with a conditional check for the custom post type and template. Here's an example: ### Code Example: function custom_enqueue_css_for_single_cpt() { // […]

Set GeoDirectory Page Homepage

User set geodirector location page as home page Assistant To set the **GeoDirectory location page** as your homepage in WordPress, follow these steps: ### Using WordPress Settings: 1. **Log in to the WordPress Dashboard.** 2. Navigate to **Settings > Reading**. 3. Under **Your homepage displays**, select **A static page**. 4. In the **Homepage** dropdown, choose […]

Task Alignment After Upgrade

User I think its better to align this task after we complete the upgrade on the live server. Correct above sentence Assistant I think it's better to align this task after completing the upgrade on the live server.

Extract adminer.sql.gz AWS

User extract adminer.sql.gz file aws ssh Assistant To extract an `adminer.sql.gz` file on an AWS EC2 instance via SSH, follow these steps: ### Steps: 1. **SSH into Your EC2 Instance** Log in to your EC2 instance using SSH: ssh -i /path/to/your-key.pem ubuntu@ec2-your-instance-address 2. **Navigate to the File Location** Move to the directory where the `adminer.sql.gz` […]

WPML language switcher fix

User WPML language switcher dropdown not showing current language at top Assistant To make the WPML language switcher dropdown show the current language at the top, you can adjust the settings or customize the output of the language switcher. Here’s how you can do it: ### 1. WPML Settings – Go to the **WPML** plugin […]

WPML language switcher issue

User Langauge switcher dropdown wpml not showing selected language at the top Assistant If the language switcher dropdown from WPML is not showing the selected language at the top of the list, you can troubleshoot the issue with the following steps: ### 1. **Check WPML Settings**: – Go to **WPML > Languages** in your WordPress […]