WordPress.org

Ready to get started?Download WordPress

Forums

SB Login
[resolved] Change LInks (7 posts)

  1. ink9
    Member
    Posted 1 year ago #

    Hello,

    Thank You for your plugin, it works perfectly with my site...

    but i do have a little bit link problem. when users logged in, How can i remove the link that links to "dashboard" and also replace the "edit profile" link to link to regular page instead wp back-end.

    Thank You.

    -Ink.

    http://wordpress.org/extend/plugins/sb-login/

  2. Redazione_INM
    Blocked
    Posted 1 year ago #

    Hi ink9
    I want to help you, because, maybe, our friend Fida is very busy. Me too, I wrote a question (already solved by me), but without any answer from author of plugin.
    In your case, you must adjust the code in the file /template/logged-in.php or, if you agree my personal changement, you can replace the following

    <ul class="links">
    		<li><a href="<?php echo site_url('/wp-admin/'); ?>"><?php _e('Dashboard','ninety'); ?></a></li>
    		<li><a href="<?php echo site_url('/wp-admin/profile.php'); ?>"><?php _e('Edit Profile','ninety'); ?></a></li>
    		<li><a href="<?php echo wp_logout_url( nd_login_current_url() ); ?>"><?php _e('Log out','ninety'); ?></a></li>
    	</ul>

    with this:

    <ul class="links">
    <?php  if ( current_user_can('edit_post') ) { ?>
    		<li><a href="<?php echo site_url('/wp-admin/'); ?>"><?php _e('Dashboard','ninety'); ?></a></li>
    		<li><a href="<?php echo site_url('/wp-admin/post-new.php'); ?>"><?php _e('New Post','ninety'); ?></a></li>
    <?php } else {?>
    		<li><a href="<?php echo site_url('/wp-admin/post-new.php'); ?>"><?php _e('New Post','ninety'); ?></a></li>
    <?php } ?>
    		<li><a href="<?php echo wp_logout_url( nd_login_current_url() ); ?>"><?php _e('Log out','ninety'); ?></a></li>
    	</ul>

    [ Signature moderated. ]

  3. ink9
    Member
    Posted 1 year ago #

    Hello Andrea,

    Thank You for taking your time out to help me....

    All I really want is to make this link

    <li><a href="<?php echo site_url('/wp-admin/profile.php'); ?>"><?php _e('Edit Profile','ninety'); ?></a></li>

    to link to a front page on my site like this:
    http://mysite.com/mypage
    That's all...
    Thank You.
    -Ink.

  4. Redazione_INM
    Blocked
    Posted 1 year ago #

    Hi ink9.
    OK!.
    You need write
    <li><a href="<?php echo site_url(); ?>"><?php _e('Home','ninety'); ?></a></li>
    That's all!.
    [ Signature moderated. ]

  5. ink9
    Member
    Posted 1 year ago #

    Thank You once again... it's working but now, its linking to my home page....

    I want it to link to my profile page like this
    example:
    http://mysite.com/myprofilepage.

    not my home page
    example:
    http://mysite.com

    I really don't know php, pls bear with me.

    -Ink.

  6. Redazione_INM
    Blocked
    Posted 1 year ago #

    Hi ink9,
    Please, link on your attached links and see yourself what appear, it' a normal homepage with error, because you must be a logged user!.
    But, before to try, logout from that site.
    In any case you have only 3 possibilities for address:

    <?php echo site_url( $path(optional), $scheme(optional) ); ?>
    <?php echo network_site_url( $path(optional), $scheme(optional) ); ?>
    <?php echo home_url( $path(optional), $scheme(optional) ); ?>

    For really help you must write the esact condition of your problem.[ Signature moderated. ]

  7. Fida Al Hasan
    Member
    Plugin Author

    Posted 1 year ago #

    Hello INK9,

    Replace the following,

    <ul class="links">
    		<li><a href="<?php echo site_url('/wp-admin/'); ?>"><?php _e('Dashboard','ninety'); ?></a></li>
    		<li><a href="<?php echo site_url('/wp-admin/profile.php'); ?>"><?php _e('Edit Profile','ninety'); ?></a></li>
    		<li><a href="<?php echo wp_logout_url( nd_login_current_url() ); ?>"><?php _e('Log out','ninety'); ?></a></li>
    	</ul>

    with this:

    <ul class="links">
    		<li><a href="<?php echo site_url('/your-page'); ?>"><?php _e('Edit Profile','ninety'); ?></a></li>
    		<li><a href="<?php echo wp_logout_url( nd_login_current_url() ); ?>"><?php _e('Log out','ninety'); ?></a></li>
    	</ul>

    @Redazione thanks for your helping.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags