Custom user URL

4.40K viewsThemes
1

By default anspress with askbug offers a user profile URL like this:

http://domain.com/questions/users/JohnDoe/

I want it to be like

http://domain.com/experts/JohnDoe/

How do achieve this?

0

Hello,
Add this the your functions.php:

/**
* Register Users page.
*/
function my_custom_register_users_page() {
ap_register_page( 'experts', __( 'Experts', 'ab' ), 'ab_users_page', true );
}
add_action( 'init', 'my_custom_register_users_page' );

commented on answer

Thank you, Rahul, but this doesn’t work exactly as I need. With code users page gets a URL like domain.com/questions/experts/ but I want to remove /questions/ part form the URL.

for other pages I would create a new page in wordpress and put there a shortcode [anspress page="smth"] but i can’t figure it out how to do the same for a user profile page

I am adding an option option to askbug for customizing users page

You are viewing 1 out of 1 answers, click here to view all answers.