Changing output of Listing Results

This topic contains 5 replies, has 3 voices, and was last updated by  Guust 10 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #17629

    Kenny Eliason
    Expired Member
    Post count: 54

    Hello! Excited about this plugin and all the functionality it provides. Looking for a little guidance. The client I’m working with is used to displaying their listings with the name, city state and zip code of the listing displayed in the results window. Any help on how I can get edit the output of the listing results?

    Here’s their old site: http://www.musclecarsofamerica.com/category/auto_parts_and_supplies/23

    New dev site: http://musclecars.wpengine.com/listings/auto-parts-and-supplies/

    Thanks!

    #17641

    Simone
    Expired Member
    Post count: 3515

    Hello Kenny,
    open the functions.php file in your child theme folder, and add this

    
    
    add_action( 'geodir_after_listing_post_title', 'country_listing', 45 );
    function country_listing() {
    global $post;
    global $wp_query;
    
    $postid = $wp_query->post->ID;
    $postcity= geodir_get_post_meta($postid,'post_city',true); 
    $postregion= geodir_get_post_meta($postid,'post_region',true); 
    $postcountry= geodir_get_post_meta($postid,'post_country',true); 
    
    echo $postcountry." - ".$postregion." - ".$postcity;
    
    }
    #17662

    Guust
    Moderator
    Post count: 29970

    Or you just could set the address custom field to show on the listing and search page.
    GD > place settings > address field > show on listings page > yes

    #17670

    Kenny Eliason
    Expired Member
    Post count: 54

    Dude, both of you are awesome! I went with Simone’s way only because it was a little more customizable, but definitely was unaware of Guust’s way, which opens up a ton of options!

    One other thing, how about removing the excerpt and favorite buttons from the listing?

    http://musclecars.wpengine.com/listings/auto-parts-and-supplies/

    Thanks!

    #17671

    Kenny Eliason
    Expired Member
    Post count: 54

    I just ended up doing display:none on the elements, if there’s a cleaner way… Let me know. Thanks!

    Kenny

    #17674

    Guust
    Moderator
    Post count: 29970

    Favorites: http://docs.wpgeodirectory.com/faq/how-do-i-disable-favorites/

    Excerpt: GD > design > listings > Description word limit
    (that is if you are talking about the description on the listing page)

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount