Change fields shown on results listings

This topic contains 1 reply, has 2 voices, and was last updated by  Paolo 8 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #199018

    John Picton
    Free User

    I’d like to change the layouts of the search results page (the results that appears after a search is performed). I have this set to display as a list at the moment, but rather than have the business description in each result with a ‘read more’ option I’d like to have the business address and the social icons, then perhaps a ‘more’ button.

    Is there any documentation available showing how I could do this, and which templates I would need to change?

    #199261

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    all this can be done via options (and few line of css and code).

    1) remove the excerpt (business description).

    Go to GeoDirectory >> Design >> Listings >> Description word limit and set that optoin to 0 (zero).

    2) Add the address and social icons

    Go to GeoDirectory >> Place Settings and double click on Address field and select YES in the option Show in Listings page?.

    Do the same for the facebook and twitter field.

    Now check this doc to see how to turn a field into an icon: https://wpgeodirectory.com/docs/custom-field-examples/

    3) Add a read more button

    Add this to your child theme functions.php

    
    
    add_action('geodir_after_listing_post_excerpt' ,'geodir_my_new_listings_content');
    
    function geodir_my_new_listings_content($tab_index)
     {
       echo '<a href="'.get_the_permalink().'">more</a>';
     }

    Let us know how you went.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 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