WP Residence Help WP Residence Help

  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code Required / Technical how to: User dashboard menu

Technical how to: User dashboard menu

4060 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

  • Introduction to WPResidence Header Customization
  • Understanding WPResidence Header Types: An Overview
  • Customizing the WPResidence Logo Display
  • Configuring the Primary Navigation Menu in WPResidence

WP Residence Documentation

  • 1. General
    • How to Get Support
    • Get your buyer license code.
    • Use SSL / https
    • Server / Theme Requirements
  • 2. Installation
  • 3. Installation FAQ
  • 4. Advanced Search
    • Advanced Search Display Settings
    • Advanced Search Form
    • Geolocation Search for Half Map
    • Save Search Theme Options
    • Advanced Search Colors
  • 5. Agent, Agency & Developers
  • 6. Property Page
  • 7. Properties List
  • 8. Property Taxonomies
  • 9. Property Custom Template
  • 10. Blog Posts & Blog List
  • 11. Shortcodes
    • Contact Form
    • Featured Agency/Developer
    • Membership Packages
    • Testimonials
    • Google Map with Property Marker
    • Listings per Agent, Agency or Developer
    • Display Categories
    • Agent List
    • Recent Items Slider
    • Recent items
    • List Properties or Articles by ID
    • Featured Agent
    • Featured Article
    • Featured Property
    • Login & Register Form
    • Icon Content Box Shortcode
  • 12. Widgets
  • Theme Options
    • General Settings
    • User Types Settings
    • Appearance
    • Logos & Favicon
    • Header
    • Footer Style and Colors
    • Price & Currency
    • Property Custom Fields
    • Features & Amenities
    • Listing Labels
    • Theme Slider
    • Permalinks
    • Splash Page
    • Social & Contact
    • Map Settings
    • Pin Management
    • How read from file works
    • General Design Settings
    • Custom Colors Settings
    • Header Design & Colors
    • Mobile Menu Colors
    • User Dashboard Colors
    • Print PDF Design
    • Property, Agent, Blog Lists Design Settings
    • Sidebar Widget Design
    • Font management
    • How to add custom CSS
    • Custom Property Card Unit – Beta version
    • Email Management
    • Import & Export theme options
    • reCaptcha settings
    • YELP API Integration
    • iHomefinder Optima Express IDX
    • MEMBERSHIP & PAYMENT Settings
    • Property Submission Page
    • PayPal Setup
    • Stripe Setup
    • Wire Transfer Payment Method
  • Translation
  • FAQ
  • Pages
  • Header
  • Footer
  • Google or Open Street Maps
  • Payment Options
  • Plugins
    • Included Plugins
    • Third Party Plugins – IDX Compatibility
    • Third Party Plugins – Multi Languages
    • Third party Plugins – Other
  • Technical
    • Technical how to | Custom Code Required
    • Technical: Child Theme
  • Theme Updates

Join Us On

Powered by WP Estate - All Rights Reserved
  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API