Changing Property Details
If you are a real estate agent and have a Genesis-based web site, chances are good you are using the AgentPress Listings plugin. If you’re not familiar with it, it is a handy free plugin that adds a Listings custom post type to your WordPress site along with a couple of widgets to show featured listings and a search bar for your home page. This can be especially helpful if you’re just starting out and do not have the budget for an IDX service, or you may work with different types of listings such as resort properties. One challenge you might encounter is wanting to know how to change the property details in the AgentPress Listings plugin that come out-of-the-box.
Here is an example of the default values
These might work fine for some but for houses here in Texas, our ground is rock so you won’t find many basements. I wanted to change “Basement” to “Garage Spaces” because we love our garages. Of course, your area might have other unique requirements. The beauty is you can change or add whatever you like with a small bit of code added to your functions.php file.
Note: Please use caution when making changes to your theme files. I highly recommend reading Editing Your WordPress Site 101, from our own Carrie Dils, which will show you how to change theme files safely.
Take the following snippet (editing the values to match what you want, of course) and drop it into your functions.php file. Notice wherever you see Garage is where it used to say Basement (You can also add entries if you like):
And here is the result
That’s all there is to it! The beauty of this change is we are not editing plugin code. So, if you should update your AgentPress Listings plugin in the future, you will not lose your changes.
Share with us how you’ve changed YOUR property details in the comments, come on show off your site!
Hello Ginger,
Thanks for sharing this as I had customized my AgentPress Property Details because most of my properties are vacant land and I didn’t update the agentpress plugin recently because of this change. Your solution is good because now it won’t affect my site when the plugin is updated.
I do however have a question that I am hoping you can help me with. How can I get a field that I do not use to not display? If you look at one of my listings and scroll down to the Property Details section you will see MLS #, Square Feet, Bedrooms, Bathrooms and Basement still being displayed.
Is there a way that I could edit this code so that these won’t display or am I going to have to edit the original plugin files and delete them? Thanks.
Hi Charlie,
It’s my pleasure! You should be able to remove those lines and show just what you would like. As always, it is recommended to do this on a test site first to be safe and also to fine tune how you’d like the details to appear.
Ginger, Thanks…I know that I can go in and edit the plugin code but the cool thing about your code is that this was done so as to not affect the plugin upgrades. So that is why I was asking if there is a way to use the functions code to “eliminate” some of the options? Like a Display None option.
Hi Charlie,
Sorry for any confusion! By removing lines I was referring to removing some of the lines in the example in the blog post above , the code you’d be adding to your functions.php file.
So, for example if you used this code:
//* Filter the property details array
add_filter( ‘agentpress_property_details’, ‘agentpress_property_details_filter’ );
function agentpress_property_details_filter( $details ) {
$details[‘col1’] = array(
__( ‘Price:’, ‘agentpress’ ) => ‘_listing_price’,
__( ‘Address:’, ‘agentpress’ ) => ‘_listing_address’,
__( ‘City:’, ‘agentpress’ ) => ‘_listing_city’,
__( ‘State:’, ‘agentpress’ ) => ‘_listing_state’,
__( ‘ZIP:’, ‘agentpress’ ) => ‘_listing_zip’,
);
$details[‘col2’] = array(
__( ‘Zoning:’, ‘agentpress’ ) => ‘_listing_zoning’,
__( ‘Acreage:’, ‘agentpress’ ) => ‘_listing_acreage’,
__( ‘Utilities:’, ‘agentpress’ ) => ‘_listing_utilities’,
);
return $details;
}
It would replace the entries in that 2nd column with Zoning, Acreage and Utilities. Hope that makes sense, if not let me, know!
Hi Carrie do i put the above snippet in the theme function php file or in agentpress?
I tried it in my development site I put in the theme file at bottom but the site stopped working
Can you help please
David
Hi David,
You’ll want to drop this code into the theme’s functions.php file in the root of your theme directory. You don’t want to alter the files in the AgentPress Listings plugin. Did you receive an error and if so what was it?
Thank you for quick reply. So if i go to my control panel on my host ie 1and1 in web explorer i can find the root file there and then drop it in functions php file. is that correct?
David
Hey there, my pleasure 🙂 It sounds like you’re on the right path (pun intended). Word of caution, even though you said you’re on your dev site, it’s good practice to make a copy of your existing functions.php file so you can easily restore if something goes wrong with your changes.
I’ve changed the code in the post above to a GitHub Gist, so all you have to do is click on the View Raw link at the bottom right to see the plain text on a screen to copy and paste to your file.
Let us know how it goes! If you still need some help wtih this, hit us up on Winning Agent Pro Support here: https://my.winningagent.com/support/
Hi thank you for the help it has worked fine on dev site only thing is it has not filled out all field with existing info ie city and state is blank i did change them to town and county before so dont know if that would of caused the info not to show. I will need to put info back on. it only shows price, street, beds bathroom. all the rest are blank.
this is the devt site http://www.testsite.glenistersdirect.co.uk
this is the public site http://www.glenisters.co.uk
David
Hi David,
I ‘m sending you an email form our support site so we can get you fixed up over there. 🙂
Hi Ginger – I have been redirected here by the good people at Studio Press. I am not a real estate agent but tweaking the AgentPress Pro theme for my tour businesses new website as the functionality will work really well with what I want to do….but I need to change the heading from Property Details to “Tour Details” and change the property details to:
Price from: NZ$
Local Payment Required: i.e US$300 per person on the first day of the tour
Tour Type: i.e. Small Group Tour
Accommodation Style: i.e. Adventure Camping
Starts: i.e Joahnnesburg, South Africa
Ends: i.e. Victoria Falls, Zimbabwe
Includes:
Excludes:
Visa Information:
Tipping: We suggest you budget approx. US$xxx for this tour.
Hi Natasha,
Thanks for reaching out! The steps in this tutorial should work for you using the AgentPress Pro theme since it’s also using the AgentPress Listings plugin. The actual label for Property Details can easily be changed to Tour Details since that part is entered manually in the listing detail as seen here in the setup:
http://my.studiopress.com/setup/agentpress-pro-theme/agentpress-listings/creating-a-property-listing/
One thing to keep in mind is the theme is expecting certain entries that it uses to style the listings on the homepage, listing archive page and detail pages. So, depending on how you’re going to lay things you you may want to leave field in place and just use another label name.
Thanks Ginger – that was a great help. All done. However so you know how to change “Additional Features” to something else? Functionality is fine just want to change the heading if possible.
Natasha great question! How to change “Additional Features” to something else?
Anyone 😉 ?
Fatal error: Cannot redeclare agentpress_property_details_filter() (previously declared in /home/XXX/public_html/XXX/wp-content/themes/agentpress-pro/functions.php:72) in /home/XXX/public_html/XXX/wp-content/plugins/agentpress-listings/includes/functions.php on line 83
Why i still get the error?
Hi jengking,
Thanks for asking this question! So you are using the AgentPress Pro theme, which already has the filter and accompanying function mentioned in this article out-of-the-box to customize the property details. So, the error message is correct — it is saying basically you cannot have the same code declared twice. This is a bonus for you actually, you don’t have to add it, just edit the function that is already there to what you would like. It starts around line 70 in the functions.php file.
hi, if i may ask, can I find the property details option in the dashboard ? if so do you know where ? my client own the agentpress pro, but lost the login to agentpress.com which denies me the documentation :/
thank you in advance
Hello! Would the above code snippet work dropped into the php file for another plugin besides Agentpress? With the plugin name inserted obviously.
Probably not. The filter is for the AgentPress Listings plugin. A different plugin would require a different filter to make changes.
Hey, I know this post is a little old, but I found it super helpful, thanks so much! I actually used this info to change the plugin completely and use it for an automotive dealer! Perfect, many thanks!
Glad to hear it David!
Being from Austin, Texas myself and now living in Colorado (basement land) I had to laugh at this: “but for houses here in Texas, our ground is rock so you won’t find many basements. I wanted to change “Basement” to “Garage Spaces” because we love our garages.” Thank you for the awesome tutorial!
All things being equal – I would take a nice 4+ car garage over a basement:-)
Is there anyway to replace the permalink in the featured listings widget to a third party link? Thanks
Not that I know of, Lynn.
AgentPress Listings plugin is supported on the WordPress plugins page; you could ask over there.
https://wordpress.org/plugins/agentpress-listings/
Hello Ginger,
just wanted to know is there a plugin which let us to customize the agentpress listing plugin and let us remove some of its field like MLS Listings and Pincode state and all.
Since i am dealing in underconstruction properties
I wanted to remove City,State,ZIP,MLS ,Basement and replace with Status,Possesion,Availiability, Launch Date and total flats launched.
Thanks for the read.
Regards
Yes, there is a premium plugin here:
http://genesisdeveloper.me/extended-agentpress-listings-widget/
It’s a good plugin, and the author is very helpful.
Hi Ginger,
I used Wpengine and have a staging site that I can test things on. I inserted the code you listed and mine still says basement.
You may be seeing a cached version of the page. Can you try clearing all the caches to see if your changes show up?
Edit: If you are using AgentPress Listings Pro theme, the AgentPress Listing details are in the functions.php already, and you just need to edit them.
I tried doing this on my site and I’m getting the dreaded “white screen of death”.
Any ideas?
Saw the other comment about the code already being in the function.php file and that was causing me the same issues.
I’d recommend adding a note in the actual post about that. I spend almost 2 hours trying different things to get it to work.
Thanks!
The code mentioned in the post needs to be added to functions.php to edit the property details. It is not in either of our themes as downloaded. If your theme had the code, it must have been added previously.
Edit: Because you have the white screen (missed that comment earlier), you are most likely using AgentPress Pro theme from StudioPress (not a Winning Agent theme). That theme does have the AgentPress Listings plugin filter already added to functions.php, so you would just edit it.
Hi Brent,
Turns out the AgentPress Pro theme already has this block of code in it, starting around line 70, so, most of the work is done! 🙂 I originally wrote this post for the Winning Agent theme, but of course, it can work in any Genesis child theme.