What’s the best way to complete links on a certain WordPress Page with everything after the slug?
So, I found a solution that seems to work great and as expected: function custom_username_links_modify_links($content) { global $post; $landing_page_id = get_option(‘custom_username_links_landing_page’); $registration_page_id = get_option(‘custom_username_links_registration_page’); if ($post && $post->ID == $landing_page_id) { $url_path = parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH); $url_parts = explode(“https://wordpress.stackexchange.com/”, trim($url_path, “https://wordpress.stackexchange.com/”)); if (count($url_parts) > 1) { $element = $url_parts[1]; $custom_username = get_user_meta(get_current_user_id(), ‘custom_username’, true); if (!empty($custom_username) … Read more