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 :
- 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.
- Remove any labels when no value is added in the listings details metabox input fields on the single listing admin page.
- 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.
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
- # Upload the file named agentpress-shortcode.php to your AgentPress Pro theme folder like this :
- # Copy & paste the PHP code ( without the opening PHP tag ) from functions.php to the end of your AgentPress Pro themes functions file.
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.
Leave a Reply
You must be logged in to post a comment.