Tagged: logo
-
AuthorPosts
-
May 31, 2017 at 6:51 pm #802143
hey guys, im planning step of some woocommerce where i will use from only register users access (frontend and backend). But my problem is:
All backend users are markets like vendors or partners from the main store. This users have they own logo image.
I need to change the main logo image of store for other logo of the logged user.
This logo, need to stay change only for this user like (sessions), because will have others users logged in on backend in the same situations.example:
user admin = logoA is the owner of all products etc..
userb = logoB (that user, sell on your local store for clients, all products from user admin, using logoB )
userc = logoC (that user, sell on your local store for clients, all products from user admin, using logoC )i saw this info, but looking closer, you have one issue for me i think… you put manually the page ID like “20” and i need for “All” pages.
https://kriesi.at/support/topic/change-logo-for-logged-in-users/May 31, 2017 at 8:05 pm #802160Hey,
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,
YigitJune 5, 2017 at 3:49 pm #803993Thanks 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 inJune 5, 2017 at 4:57 pm #804046Hi,
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,
YigitJune 6, 2017 at 2:42 pm #804511ok, thanks for answer. Your idea check with we are thinking of userID
June 6, 2017 at 3:04 pm #804523Hi there!
Do you still need our help with this?
Best regards,
SarahJune 6, 2017 at 6:00 pm #804619Only 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?
June 6, 2017 at 6:14 pm #804622Hi,
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,
YigitJune 7, 2017 at 1:08 am #804764I mean with back end = wp-admin panel
but thanks for this answerYou can close this.
June 7, 2017 at 8:54 am #804929Hi,
We glad that your problem was solved!
Best regards,
John Torvik -
AuthorPosts
- The topic ‘how to Change Logo for Logged in users in all frontend pages’ is closed to new replies.