WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code Required / Technical how to: User dashboard menu

Technical how to: User dashboard menu

4624 views 0

There are 2 types of user menu – both are generated by the same function wpestate_generate_user_menu().

The function is located in libs/dashboard_functions.php –  function wpestate_generate_user_menu at line 1429.

The top menu is in templates/user_menu.php .  It uses the wpestate_generate_user_menu to show the menu

<div class="user_tab_menu">
<ul class="user_dashboard_links">
<?php wpestate_generate_user_menu(); ?>
</ul>
</div>

The menu on right part (appears when you click the picture or submit property ).

This menu is located in templates/top_user_menu.php

The “Submit Property” (when the user is not logged in) and the user image (when the user is logged in) can be found around line 15 .

<?php if(is_user_logged_in()){ ?>
<div class="user_menu user_loged" id="user_menu_u">
<a class="menu_user_tools dropdown" id="user_menu_trigger" data-toggle="dropdown">
<a class="navicon-button x">
<div class="navicon"></div>
</a>
<div class="menu_user_picture" style="background-image: url('<?php print $user_small_picture[0]; ?>');"></div>
<?php }else{ ?>
<div class="user_menu" id="user_menu_u">
<a class="menu_user_tools dropdown" id="user_menu_trigger" data-toggle="dropdown">
<a class="navicon-button x">
<div class="navicon"></div>
</a>
<div class="submit_action"><?php _e('Submit Property','wpestate');?></div>
<?php } ?>

In there we do a check to see if the user is logged in.

if ( 0 != $current_user->ID  && is_user_logged_in() ) {

if yes we show the user dashboard links , if no we show the login & register forms.

The show/hide functionality is made via javascript in control.js around line 1050

$('#user_menu_u').click(function(event){
if( $('#user_menu_open').is(":visible")){

We also check for WooCommerce and enable the the show cart via

if( class_exists( 'WooCommerce' ) ){
$wpestate_global_payments->show_cart();
}
Technical how to | Custom Code Required

Related Articles

  • Technical: Change the Schedule Tour Email Text and the Form Default Message
  • Property list filter customization
  • Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence
  • Introduction to WPResidence Header Customization

Help Categories

  • 18Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 39Elementor Shortcodes Built-In
  • 53FAQ
  • 15Footer
  • 5Getting Started
  • 37Header
  • 2IDX & MLSImport
  • 6Installation & Setup
  • 24Installation FAQ
  • 23Maps & Location Settings
  • 21Multi-Language - Third Party Plugins
  • 6Other Third party Plugins
  • 21Pages
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 37Property Pages & Layouts
  • 32Search & Filtering
  • 162Technical how to | Custom Code Required
  • 8Technical: Actions and filters
  • 7Technical: Child Theme
  • 86Theme Options & Global Settings
  • 7Translations & Languages
  • 16WPBakery Shortcodes
  • 50WPEstate / WPResidence Translate Plugin
  • 51WPResidence / WPEstate CRM
  • 50WPResidence 5.0 Documentation
  • 9WPResidence Elementor Studio

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API