Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1109304

    I am creating a redirect that will point certain users to a custom homepage. I would like that custom homepage to have a custom logo link where the standard logo/link reside.

    Not Logged In
    Homepage 1

    Logged In
    (Administrator, Reseller)
    Homepage 2

    #1109309

    maybe you can use this function:

    if ( is_user_logged_in() ) {
       // your code for logged in user 
    } else {
       // your code for logged out user 
    }

    see here – Gratitude goes to Ismael: https://kriesi.at/support/topic/change-logo-for-logged-in-users/#post-251039

    add_filter('avf_logo_final_output', 'avf_logged_logo_final_output');
    
    function avf_logged_logo_final_output($logo) {
    	$headline_type = "span";
    	if($dimension === true) $dimension = "height='100' width='300'"; //basically just for better page speed ranking :P
    	$loggedinlogo  = "<img {$dimension} src='LOGGED IN LOGO IMAGE URL HERE'>";
    	$loggedoutlogo = "<img {$dimension} src='LOGGED OUT LOGO IMAGE URL HERE'>";
    	
    	if ( is_user_logged_in() ) {
        $logo = "<$headline_type class='logo bg-logo'><a href='".$link."'>".$loggedinlogo."$sub</a></$headline_type>";
    	} else {
    	$logo = "<$headline_type class='logo bg-logo'><a href='".$link."'>".$loggedoutlogo."$sub</a></$headline_type>";
    	}
    	
    	return $logo;
    }

    for $headline_type you can use h1 or div or span etc.
    btw. dear team : on function-set-avia-frontend.php on lines: 513ff i see that there is still a h1 tag for that. Why have all my enfold installations a span instead – what i think is better?

    #1109564

    Thank you. I guess my question is how to differentiate between logged in customer and logged in reseller. I don’t know how I would do that.

    #1109882

    Hi,

    differentiate between logged in customer and logged in reseller.

    Are you using a plugin for that? There may be a meta information that we can pull to differentiate the users.

    btw. dear team : on function-set-avia-frontend.php on lines: 513ff i see that there is still a h1 tag for that. Why have all my enfold installations a span instead – what i think is better?

    I think it depends on the structure of the page. If you don’t have a post title or heading in the frontpage, then it is appropriate to use the h1 tag for the logo. You can then convert it to something else for inner pages because they usually contain a title, which is typically wrap in an h1 tag.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.