1,496 reputation
1312
bio website
location
age
visits member for 2 years, 10 months
seen Dec 15 at 10:31

Nov
5
comment How to override WordPress registration and insert an auto-generated username?
The concept is the same, but you might need to update the code above to overwrite whatever $_POST value passed to register_new_user() or wp_insert_user() as the user login name. Also the hooks mentioned above only works on wp-login.php, so you will need to change it to a hook that fires before processing the form, init or after_setup_theme might work depending on at what point the form is processed.
Nov
5
comment How to override WordPress registration and insert an auto-generated username?
Are you using default wp-login.php?action=register or a custom URL?
Nov
5
answered How to override WordPress registration and insert an auto-generated username?
Oct
16
comment How to call plugin path in JS?
First, the second argument of wp_localize_script is the object name or variable name that will be accessible in JS and this name should contain only valid characters and the dash - is not, so try wp_localize_script('wpsl-gmap', 'wpslGmap' .. instead. Second, I dont know if this is a typo, but first argument must be provided in plugins_url() to pass the second argument, so fix your code to plugins_url('', __FILE__).
Oct
16
answered How to call plugin path in JS?
Jul
2
awarded  Revival
May
28
awarded  Popular Question
Feb
9
awarded  Yearling
Oct
31
comment How to do a wp_query using “BETWEEN” with two meta_values?
@kaiser Thanks, but as the data type is casted to DATE, I am not sure if WP will format it properly while constructing the meta_query, so it is safer to directly use the MySQL date format in this case.
Oct
31
answered Shortcode inserts paragraphs before and after executing shortcode
Oct
30
answered How to do a wp_query using “BETWEEN” with two meta_values?
Jun
19
comment How to programatically change username (user_login)?
@pogoking One thing you might want to consider is that user or author permalinks might be broken after enabling users to change their usernames if pretty permalinks are enabled, so you might need to make measures to compensate for that.
Jun
7
answered How to create a theme specific translation of buddypress?
Feb
25
answered Conditional based on the User Role of the Current Profile the user is viewing - BuddyPress
Feb
24
comment How to carry over existing wp users to a new buddypress installation
When you copy the code to the new file you create, make sure there is no spaces before the opening php tag <?php. Any character or single space or new line between the opening <?php and the top of the page might caused that error, you need to put the <?php at the very beginning of the page.
Feb
21
comment How to carry over existing wp users to a new buddypress installation
How exactly it broke the website? What messages/debug information it shows you? This code simply will get all your WP users, loop through them to update each last_activity field to the current date, and I have tested it with no issues. You also can hook add_users_to_bp() function above to init action in functions.php and visit your website once to trigger this update and after that delete the code from functions.php so it wont be triggered on each request (add_action('init', 'add_users_to_bp');).
Feb
19
awarded  Analytical
Feb
19
answered How to carry over existing wp users to a new buddypress installation
Feb
19
awarded  Informed
Feb
19
answered Adding short codes from a page's content on header and hiding the same from page's content