• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Can't figure out comma in AgentPress

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Can't figure out comma in AgentPress

This topic is: resolved

Tagged: Agentpress, archive, listings

  • This topic has 7 replies, 2 voices, and was last updated 13 years, 1 month ago by purplepatriot.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • April 17, 2013 at 9:33 am #35947
    Kent
    Participant

    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

    Anyone?

    Thanks,

    -Kent

     

     


    Dad. Biker. Designer. | kentfackenthall.com

    http://www.kentfackenthall.com/agentpress/bedrooms/two/?s&post_type=listing&price&location
    April 17, 2013 at 9:40 am #35951
    purplepatriot
    Member

    Hi 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 #35953
    Kent
    Participant

    Eric,

    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 #35956
    purplepatriot
    Member

    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?


    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 #35958
    Kent
    Participant

    Eric,

    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 #35963
    purplepatriot
    Member

    OK, 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 #35965
    Kent
    Participant

    BOOM. Worked. Awesome. I shoulda thought of that.

    You rock man, thanks!

    -Kent


    Dad. Biker. Designer. | kentfackenthall.com

    April 17, 2013 at 11:05 am #35968
    purplepatriot
    Member

    You'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.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Can't figure out comma in AgentPress’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble