April 17, 2013 at 9:33 am #35947
This seems silly, but I’ve spent an hour trying to figure this out.
I have adjusted the fields in the Property Details section of AgentPress to only show the city – that’s all the client wants. What I can’t figure out is how to get rid of the comma that appears after the city in archive results….see link here.
I’ve tried editing both functions.php and archive-listing.php
April 17, 2013 at 9:40 am #35951
Just took a quick look at those files. Try this and see if it works. In archive-listings.php, inside the archive listings loop, you’ll see this:
[php]$loop .= sprintf( ‘<span class="listing-city-state-zip">%s %s, %s</span>’, genesis_get_custom_field(‘_listing_city’), genesis_get_custom_field(‘_listing_state’), genesis_get_custom_field(‘_listing_zip’) );[/php]
Replace it with this:
[php]$loop .= sprintf( ‘<span class="listing-city-state-zip">%s</span>’, genesis_get_custom_field(‘_listing_city’) );[/php]
Not sure if you need this change everywhere in the site, so you may need to make the same change within functions.php.
Let me know how it goes.
April 17, 2013 at 9:48 am #35953
No dice. Bizarre. I’d tried pretty much the same thing. I replaced the code in both archive-listings.php and the AgentPress Featured Listings portion of functions.php with your code still, no luck.
April 17, 2013 at 10:11 am #35956
Huh. I just loaded that theme on a test site, added some taxonomy terms and made a listing. When you said changing the code in those two areas did not work, I thought maybe it was in the AgentPress listings plugin. So, I made the change in a php file there, but that did not change anything. So, I made the change to archive-listing.php, and that didn’t change. But, when I made the change in functions.php, it worked.
Are you displaying those with the AgentPress Featured Listings widget?
April 17, 2013 at 10:30 am #35958
No. Those are the results of a listings search through the drop downs on the homepage. I just assumed it pulled the same styling as the Featured Listings widget, because it looks the same.
April 17, 2013 at 10:50 am #35963April 17, 2013 at 10:57 am #35965April 17, 2013 at 11:05 am #35968
The topic ‘Can't figure out comma in AgentPress’ is closed to new replies.