Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #802143
    #802160

    Hey,

    Thanks for contacting us!

    Unfortunately, such customization would be out of the scope of our forum however i would like to provide some pointers anyway :)

    Please use this plugin – https://wordpress.org/plugins/advanced-custom-fields/ and add custom field to users page where users can upload their logos (you would get URLs) then add following code to Functions.php file in Appearance > Editor

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if(is_page(9) )
        {
        $logo = "http://kriesi.at/wp-content/themes/kriesi/images/users-logo.png";
        }
        else
        {
        $logo = "http://kriesi.at/wp-content/themes/kriesi/images/default-logo.png";
        }
        return $logo;
    }

    and customize it to get the field, get user, then check if user uploaded a logo, if so, display that logo, if not, display default logo :)

    Best regards,
    Yigit

    #803993

    Thanks for answer, i was searching more then your answer but…

    This ID = 9 (is for unique page), Im talking about all pages (backend and frontend) because this would be one woocommerce site, i will not have control of new pages coming, understand?

    Other thing im confusing now are:
    This online market will have more then 5 users logged in simultaneously. This change of logo affect for session? im little confuse of how this work for all users logged in

    #804046

    Hi,

    That code was just an example. Instead of page ID, you should check user ID and if they uploaded a logo or not, as i mentioned above.
    Such changes would require heavy customization. Please consider to hire a freelance developer :)

    Best regards,
    Yigit

    #804511

    ok, thanks for answer. Your idea check with we are thinking of userID

    #804523

    Hi there!

    Do you still need our help with this?

    Best regards,
    Sarah

    #804619

    Only if you can progress with advanced tips because in parts i dont get the answer for this:

    This ID = 9 (is for unique page), Im talking about all pages (backend and frontend) because this would be one woocommerce site, i will not have control of new pages coming, understand?

    #804622

    Hi,

    As i mentioned before, that was just an example. That code checks if page ID is 9 or not. What you need to do there is (instead of checking if page ID is 9) to check if current user has uploaded a logo (in custom field that you added using ACF plugin, as i suggested above). If user uploaded a logo, display it. If he/she did not upload it, display default logo. This is for the logo on front-end. I am not sure what exactly you mean by back-end logo though :)

    I found this example where they switch WordPress theme depending on the user. It should help with getting user information etc.

    Best regards,
    Yigit

    #804764

    I mean with back end = wp-admin panel
    but thanks for this answer

    You can close this.

    #804929

    Hi,

    We glad that your problem was solved!

    Best regards,
    John Torvik

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘how to Change Logo for Logged in users in all frontend pages’ is closed to new replies.