• Resolved alexlanc

    (@alexlanc)


    I am running UM 2.3.2 with the following WordPress version

    WordPress 6.0
    HP version: 7.4.29.
    MySQL version: 10.3.35-MariaDB

    I was previously successfully using the code snippets here:

    https://www.ads-software.com/support/topic/profile-page-website-url-logo-with-social-links-in-the-header/

    specifically this snippet:

    add_filter("um_builtin_all_user_fields","um_092221_website_url_social");
    function um_092221_website_url_social( $fields ){
    
        foreach ( $fields as $field => $args ) {
            if ( isset( $field ) && $field == 'user_url' ) {
                $fields[ $field ]['advanced'] = 'social';
                $fields[ $field ]['icon'] = 'um-faicon-globe';
                $fields[ $field ]['match'] = 'https://';
                $fields[ $field ]['color'] = '#96979a';          
            }
        }
        return $fields;
    }

    to display the user_url in the header. But after moving from WordPress 5.9 to WordPress 6.0, now all the links include this (preprended before the expected user_url:

    <br /><b>Warning</b>: strstr(): Empty needle in <b>/home/ronininstitute/public_html/wp-content/plugins/ultimate-member/includes/um-short-functions.php</b> on line <b>926</b><br />

Viewing 3 replies - 1 through 3 (of 3 total)
  • @alexlanc

    If you have custom URL’s, replace the match content with this code:

    $custom[$field]['match'] = ' ';

    Thread Starter alexlanc

    (@alexlanc)

    @missveronicatv thank you – I replaced

    $fields[ $field ]['match'] = 'https://';

    with

    $fields[ $field ]['match'] = ' ';

    and it seems to work fine now. Wondering exactly why it the previous solution worked but doesn’t now. Is the above just a workaround, or was the original solution wrong/incomplete?

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Thanks for letting us know how you’ve resolved the issue. If you have a custom URL, you can try the above solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘adding user_url to header no longer works’ is closed to new replies.