This topic has 10 replies, 4 voices, and was last updated 8 years by tom70.

  • Author
  • #28713
     alberhd
    Participant

    Hello,how can i redirect the logged user to the members page when the user press the logo?

    Thanks!

    #28790
     alberhd
    Participant

    Maybe this option is better,how can i disable the redirection of a logged user to home page after press the logo?

    #28950
     alberhd
    Participant

    Ok…so just disable the link of the logo for the logged users?

    #28961
     gregmc
    Participant

    why not use the BuddyPress login redirect free plugin to do this?

    https://wordpress.org/plugins/buddypress-login-redirect/

    #28962
     alberhd
    Participant

    Thank you for your answer,right know the logged user is redirected to their profile,but after, if the logged user press the logo can go the the home page and i need lock that the logged user can go again to the home page.

    #29508
     Catalin
    Moderator

    so you want the logged in users not to be able to return to homepage if they click on the logo… i don’t really understand your request… you could achieve this by creating a custom header.php file and use it in the template… please give me more details about this… you can also hide the logo on the profile page…

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #29509
     alberhd
    Participant

    yes,i need this: “so you want the logged in users not to be able to return to homepage if they click on the logo”

    Thank you!

    #29524
     Catalin
    Moderator

    Hello,

    You should copy the header.php file to your child theme theme and replace:

    COPY CODE
    
    <h1 id="logo"><?php bloginfo('name'); ?>
    <a>"><img />" width="294" height="108" alt="<?php bloginfo('name'); ?>"></a>
    </h1>
    

    with

    COPY CODE
    
    
      <?php if(is_user_logged_in() ) : ?>
                            <h1 id="logo"><?php bloginfo('name'); ?>
                               <img />" width="294" height="108" alt="<?php bloginfo('name'); ?>">
                            </h1>
                        <?php else : ?>
                            <h1 id="logo"><?php bloginfo('name'); ?>
                                <a>"><img />" width="294" height="108" alt="<?php bloginfo('name'); ?>"></a>
                            </h1>
                        <?php endif; ?>
    
    

    let me know if this works.

    Thank you,
    Catalin

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #29527
     alberhd
    Participant

    i found this code at the header and i followed your instructions,but the page gave me a error.

    COPY CODE
    <div class="four columns">
    					<h1 id="logo"><?php bloginfo('name'); ?>
    						<a href="<?php echo get_home_url(); ?>"><img id="logo_img" src="<?php echo sq_option('logo',get_template_directory_uri().'/assets/images/logo.png'); ?>" width="294" height="108" alt="<?php bloginfo('name'); ?>"></a>
    					</h1>
    				</div>
    #29528
     Catalin
    Moderator

    I tested the code on my server and it works… be careful at syntax… please paste the error here to figure it out…

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #80471
     tom70
    Participant

    Why use the code when you can go to settings/reading and do it. Isn`t that the way to do it?

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?