Community Forums › Forums › Archived Forums › General Discussion › Can't figure out comma in AgentPress
Tagged: Agentpress, archive, listings
- This topic has 7 replies, 2 voices, and was last updated 11 years, 10 months ago by
purplepatriot.
-
AuthorPosts
-
April 17, 2013 at 9:33 am #35947
Kent
ParticipantThis 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
Anyone?
Thanks,
-Kent
Dad. Biker. Designer. | kentfackenthall.com
April 17, 2013 at 9:40 am #35951purplepatriot
MemberHi Kent,
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:
$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') );
Replace it with this:
$loop .= sprintf( '<span class="listing-city-state-zip">%s</span>', genesis_get_custom_field('_listing_city') );
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.
Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
“Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums.April 17, 2013 at 9:48 am #35953Kent
ParticipantEric,
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.
Thanks tho.
-Kent
Dad. Biker. Designer. | kentfackenthall.com
April 17, 2013 at 10:11 am #35956purplepatriot
MemberHuh. 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?
Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
“Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums.April 17, 2013 at 10:30 am #35958Kent
ParticipantEric,
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.
-Kent
Dad. Biker. Designer. | kentfackenthall.com
April 17, 2013 at 10:50 am #35963purplepatriot
MemberOK, changed the same code in taxonomy.php. I tried this for searched listings, and it updated.
Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
“Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums.April 17, 2013 at 10:57 am #35965Kent
ParticipantBOOM. Worked. Awesome. I shoulda thought of that.
You rock man, thanks!
-Kent
Dad. Biker. Designer. | kentfackenthall.com
April 17, 2013 at 11:05 am #35968purplepatriot
MemberYou're welcome - glad to help! And now I know a little more about the AgentPress theme innards. So, thank you! =)
Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
“Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums. -
AuthorPosts
- The topic ‘Can't figure out comma in AgentPress’ is closed to new replies.