• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Modify AgentPress Listings Plugin Property Details Class Shortcode Function

This file enables you to modify the AgentPress listings plugins property details shortcode function included in the plugins class-agentpress-listings.php file.

This file is modified in your AgentPress Pro child theme folder so any modification you make to the property_details_shortcode( $atts ) function is not lost when the plugin is updated.

The file in this download folder enables you to safely modify :

  1. The markup for the property details shortcode enabling you to remove HTML tags and replace them with classes for styling both the label and value for each property value.
  2. Remove any labels when no value is added in the listings details metabox input fields on the single listing admin page.
  3. Remove the label for the Additional Features if none added.

Here’s an example where the markup has been removed and replaced with custom classes enabling the use of CSS Grid to display property details in table like columns if the value field is not empty.

Property Details Shortcode - AgentPress Pro Listings Plugin HTML output

Demo Video

Shows the markup and output for the AgentPress Listings plugins shortcodenm modified via the AgentPress Pro child theme.

The code only executes when the AgentPress Listings plugin is active.

Installation Steps

  1. # Upload the file named agentpress-shortcode.php to your AgentPress Pro theme folder like this :
  2.  

    Step 1

  3. # Copy & paste the PHP code ( without the opening PHP tag ) from functions.php to the end of your AgentPress Pro themes functions file.
  4.  

    Step 2

Download Folder

Optional – Example HTML & CSS

You can then copy & paste the CSS from the style.css file to the end of your AgentPress Pro themes style sheet and clear caching. This is demo CSS which produces what you see in the screenshot at the beginning of this tutorial.

Also add this HTML to your editor on the Single Listings Edit screen as seen in the demo video.

Related Tutorials

  • Custom Fields On AgentPress Search Results Page

AgentPress Pro Theme

Reader Interactions

Comments

  1. sebastian taru says

    March 22, 2021 at 4:14 pm

    It worked but all markup has been removed and replaced with custom classes. even the featured image is displayed in half now. Looks ok in mobile devices but not on desktop.
    See here: https://ibiza.realestate/listings/modern-house-with-sea-views-to-es-vedra/

    Log in to Reply
    • Brad Dalton says

      March 22, 2021 at 4:22 pm

      Yes, thats what its coded to do so you can add your own markup and change the styling for customization as detailed in the tutorial description. If you want to use the default markup, just add it back from the listings plugin.

      Log in to Reply
  2. sebastian taru says

    March 21, 2021 at 3:23 pm

    Hello Brad
    The code works except the CSS. Any idea?
    Thanks

    Log in to Reply
    • Brad Dalton says

      March 21, 2021 at 3:48 pm

      It depends on how you want to style it. Sample CSS is provided to style the HTML output as seen in the screenshot.

      Log in to Reply
  3. Alejandro Perez says

    July 4, 2020 at 10:23 pm

    Is it possible to rename the title “Property Details” for something else ?

    Log in to Reply
    • Brad Dalton says

      July 5, 2020 at 12:36 am

      In the backend?

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.