WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code / Technical How to: print functions on property page

Technical How to: print functions on property page

4009 views 0

The print function that appears on the property page is made via ajax. It means the action is triggered in the JavaScript while the actual print function is in php.

The JavaScript code can be fond in control.js around line 192

$('#print_page').click(function(event){
var prop_id, myWindow, ajaxurl;

 

The php function that create the “print” is  wpestate_ajax_create_printand can be found in plugins\wpresidence_core\misc\plugin_help_functions.php”

function wpestate_ajax_create_print(){

$post_id = $_POST[‘propid’];
$unit = esc_html( get_option(‘wp_estate_measure_sys’, ”) );

In the beginning of the function we gather information about the property  using get_post_meta or get_the_author_meta for agent/user.

The actul printing starts at line 1114

print  '<html><head><link href="'.get_stylesheet_uri().'" rel="stylesheet" type="text/css" /></head>';

The css classes for the print page can be found in scss\property_page\_print_page_style.scss . You can add your own css code in chidtheme and overwrite this one.

Technical how to | Custom Code

Related Articles

  • How to Add Custom Fields to the Login, Register and Forgot Password Forms
  • 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
MLSImportWordPress IDX Plugin for MLS ListingsImport MLS listings into your WordPress website, customize your property pages, and keep your inventory updated.Start free 30-day trial →

Help Categories

  • 111 Installation & Changelog
  • 19Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 14Footer
  • 38Header
  • 2IDX & MLSImport
  • 23Maps & Location Settings
  • 50Multilingual Websites – WPEstate Translate (Included)
  • 21Pages & Page Templates
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 38Property Single Page
  • 32Search & Filtering
  • 170Technical how to | Custom Code
  • 9Technical: Actions and filters
  • 6Technical: Child Theme
  • 86Theme Options & Global Settings
  • 6Theme Translation & Localization
  • 28Third Party Plugins Compatible
  • 16WPBakery Shortcodes
  • 51WPResidence / WPEstate CRM
  • 9WPResidence Elementor Studio
  • 39WPResidence Elementor Widgets
  • 79WPResidence FAQ

Join Us On

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