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 11 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
October 29, 2014 at 11:06 am #19939
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?
October 29, 2014 at 11:30 am #19943I’ve alerted Stiofan
October 29, 2014 at 11:44 am #19951Do 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');October 29, 2014 at 11:47 am #19952Stiofan,
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
October 29, 2014 at 12:23 pm #19958Yes that is the correct one i posted above.
Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket