Change "Sign In" heading.... but only on Add Listing page

Kind of an odd request but my client does not want it when you click on Add Listing and you’re not logged in, to see the heading on that page say Add Listing instead of Sign In because he thinks it will confuse people who want to be on the Add Listing page.

If I change it in Loco Translate, then everything that says Sign In changes to Add Listing. So that won’t work. Is there a way to change it exclusively on the Add Listing not logged in page?

Please try this PHP snippet

add_filter(
    'hivepress/v1/routes',
    function( $routes ) {
		if(strpos(hivepress()->router->get_redirect_url(), '/submit-listing') !== false){
			$routes['user_login_page']['title'] = 'Test';
		}
	
        return $routes;
    },
    1000
);
1 Like

Tried that, but it still says Sign In at the Heading.

Never mind. It’s resolved. That code does work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.