Support » Plugin: Login With Ajax » Custom link for logged in users

  • Love this plugin/widget @netweblogic

    I’m using it with EM Pro and was wondering if you could point a non coder in the right direction of inserting a custom URL into the widget for logged in users. Which file I need to be looking at and what line

    my bookings […/events/my-bookings]

    Thanks for any help.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marcus


    Hi Will, check the plugin notes for help with templates, you could just add a regular HTML link there since it’s specific to your site. Otherwise ask on our Pro support forums, someone can help you in more detail there

    Thread Starter Will Pom


    Thanks Marcus, found the right file & just added html, works a treat.

    Hey William – can you share the document and line item you edited to add in HTML to login modal? I read the notes am unsure what to do. Novice here. Thank you!

    Login with Ajax >Widget >Default >widget_in.php

    Look for My-Bookings URL. I seem to remember I fiddled with a bit of code around it. I’m a novice too.

     * This is the page users will see logged in. 
     * You can edit this, but for upgrade safety you should copy and modify this file into your template folder.
     * The location from within your template folder is plugins/login-with-ajax/ (create these directories if they don't exist)
    <div class="lwa">
    		$user = wp_get_current_user();
    	<span class="lwa-title-sub" style="display:none"><?php echo __( 'Hi', 'login-with-ajax' ) . " " . $user->display_name  ?></span>
    			<td class="avatar lwa-avatar">
    				<?php echo get_avatar( $user->ID, $size = '50' );  ?>
    			<td class="lwa-info">
    					//Admin URL
    					if ( $lwa_data['profile_link'] == '1' ) {
    						if( function_exists('bp_loggedin_user_link') ){
    							<a href="<?php bp_loggedin_user_link(); ?>"><?php esc_html_e('Profile','login-with-ajax') ?></a><br/>
    							<a href="<?php echo trailingslashit(get_admin_url()); ?>profile.php"><?php esc_html_e('Profile','login-with-ajax') ?></a><br/>
    				    <!--My-Bookings URL-->
    					<a href="">My Bookings</a><br/>
    				    <!--Logout URL-->
    					<a id="wp-logout" href="<?php echo wp_logout_url() ?>"><?php esc_html_e( 'Log Out' ,'login-with-ajax') ?></a><br/>
    					//Blog Admin
    					if( current_user_can('list_users') ) {
    						<a href="<?php echo get_admin_url(); ?>"><?php esc_html_e("blog admin", 'login-with-ajax'); ?></a>

    Look for My-Bookings URL in the code given – it won’t be in the widget_in.php until you add it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom link for logged in users’ is closed to new replies.