Lost My GD Welcome Widget After Upgrading To Avada

This topic contains 4 replies, has 3 voices, and was last updated by  Stiofan O’Connor 10 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #19939

    adriangraham
    Expired Member
    Post count: 426

    Lost My GD Welcome Widget After Upgrading To Avada… it’s a handy little widget to place on the screens…. but it’s not available in “Appearance -> Widgets” any more after Avada upgrade?

    #19943

    Simone
    Expired Member
    Post count: 3515

    I’ve alerted Stiofan

    #19951

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Do you mean welcome login widget? that is part of the GDF theme, you can however copy this code to your child theme functions to get it back though you might have to style it yourself.

    
    
    // =============================== Login Widget ======================================
    class gdf_welcome_loginwidget extends WP_Widget {
    	function gdf_welcome_loginwidget() {
    	//Constructor
    		$widget_ops = array('classname' => 'Loginbox', 'description' => 'Welcome Login Widget' );		
    		$this->WP_Widget('widget_gdf_welcome_loginwidget', 'GDF > Welcome Login', $widget_ops);
    	}
    	function widget($args, $instance) {
    	// prints the widget
    		extract($args, EXTR_SKIP);
    		$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
    		 					
    		global $current_user;
    		if (function_exists('geodir_getlink')) {
    		$login_url = geodir_getlink(home_url(),array('geodir_signup'=>'true'),false);
    		$logout_url = wp_logout_url( home_url() );
    		$add_listurl = get_permalink( get_option('geodir_add_listing_page') );
    		$add_listurl = geodir_getlink( $add_listurl, array('listing_type'=>'gd_place') );
    		if(get_current_user_id()) { 
    			$author_link = get_author_posts_url( $current_user->data->ID );
    			$author_link = geodir_getlink($author_link,array('geodir_dashbord'=>'true','stype'=>'gd_place'),false);
    			$authorfav_link = geodir_getlink($author_link,array('stype'=>'gd_place','list'=>'favourite'),false);
    		}
    		}else{
    		$login_url = wp_login_url( get_permalink() );
    		$logout_url = wp_logout_url( home_url() );
    		
    			
    		}
    ?><div class="gdf_welcome_login_wrap"	><ul class="gdf_welcome_login"><?php			
    if(get_current_user_id()) { $display_name = $current_user->data->display_name; ?>
    <li class="welcome"> <span><?php _e('Welcome',GEODIRECTORY_FRAMEWORK);?>, </span>  <a href="<?php echo $author_link;?>" title="<?php echo $display_name;?>">  <?php echo $display_name;?></a></li>
    <li class="userin"><a href="<?php echo $logout_url;?>" class="signin"><?php _e('Logout',GEODIRECTORY_FRAMEWORK);?></a></li>
    <?php }else{ ?>
    <li class="welcome"><span><?php _e('Welcome',GEODIRECTORY_FRAMEWORK);?>, <strong><?php _e('Guest',GEODIRECTORY_FRAMEWORK);?></strong></span> </li>
    <li class="userin"><a href="<?php echo $login_url;?>" class="signin"><?php _e('Sign in',GEODIRECTORY_FRAMEWORK);?></a></li>
    <?php }?>
    </ul>
    </div>
            
     	<?php
    	}
    	function update($new_instance, $old_instance) {
    	//save the widget
    		$instance = $old_instance;		
    		$instance['title'] = strip_tags($new_instance['title']);
    		return $instance;
    	}
    	function form($instance) {
    	//widgetform in backend
    		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );		
    		$title = strip_tags($instance['title']);
    ?>
    		<p>No settings for this widget</p>
         
        
    <?php
    	}}
    register_widget('gdf_welcome_loginwidget');
    #19952

    adriangraham
    Expired Member
    Post count: 426

    Stiofan,

    No the login one is fine.. it’s the “GD> Welcome” one… that shows you name (and link to your listings) if you are logged in…. and shows “Welcome Guest, Sign in” if you are now

    Adrian

    #19958

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes that is the correct one i posted above.

    Stiofan

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount