Can't figure out comma in AgentPress

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

This topic is: resolved

This topic contains 7 replies, has 2 voices, and was last updated by  purplepatriot 1 year ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #35947

    Kent
    Participant
    Post count: 58

    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 | Circle me on Google+, and say hi so I can add you to my WordPress circle!

    http://www.kentfackenthall.com/agentpress/bedrooms/two/?s&post_type=listing&price&location
    #35951

    purplepatriot
    Participant
    Post count: 34

    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.

    #35953

    Kent
    Participant
    Post count: 58

    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 | Circle me on Google+, and say hi so I can add you to my WordPress circle!

    #35956

    purplepatriot
    Participant
    Post count: 34

    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.

    #35958

    Kent
    Participant
    Post count: 58

    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 | Circle me on Google+, and say hi so I can add you to my WordPress circle!

    #35963

    purplepatriot
    Participant
    Post count: 34

    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.

    #35965

    Kent
    Participant
    Post count: 58

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

    You rock man, thanks!

    -Kent


    Dad. Biker. Designer. | kentfackenthall.com | Circle me on Google+, and say hi so I can add you to my WordPress circle!

    #35968

    purplepatriot
    Participant
    Post count: 34

    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.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Can't figure out comma in AgentPress’ is closed to new replies.