Customize Grid View

This topic contains 7 replies, has 4 voices, and was last updated by  Giri 7 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #392149

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Hi,
    I would like to customize the Grid view through the functions.php like I’m doing for the single view.
    Are there any hooks or something like?

    Thanks!
    Andrea

    #392153

    Kor
    Moderator
    Post count: 16516

    Hi Andrea,

    Could you tell a little bit more about what are you trying to achieve? Are you trying to change the grid size? Well, let us know how it goes.

    Thanks!

    #392159

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Hi,
    no I’m trying to change the content of each single grid item.
    I’ve both geodirectory and buddypress in my site and I would like to display the “Author’s Name” field (just a custom field of buddypress) of each published element.

    I’ve do this for the single item by using an hook function.
    I would like to do the same for the grid view.

    THANKS!!!

    #392208

    Paolo
    Site Admin
    Post count: 31211

    This should do it:

    
    
    add_action('geodir_after_listing_post_excerpt' ,'geodir_my_new_listings_content');
    function geodir_my_new_listings_content($tab_index)
     {
      the_author();
     }

    I haven’t tested it though.

    Let us know,

    Thanks

    #392269

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Hi,
    thank you very much.
    Yess it works, after some searching I’ve found “geodir_before_listing_post_title” too.

    Now the best for me will be and action to insert custom text at the very end of each Grid View item.
    I’ve the “Add to favourite” button at the end of each grid item, I would like to insert the published date after it.

    Thank you very much for your great support.
    Thanks!

    Andrea

    #392328

    Giri
    Expired Member
    Post count: 3155

    Hi Andrea, you can use this hook.

    geodir_after_favorite_html

    
    
    add_action('geodir_after_favorite_html' ,'geodir_after_favorite_html_date');
    function geodir_after_favorite_html_date($post_id)
     {
      echo get_the_date();
     }
    #392464

    Andrea Piaggesi
    Expired Member
    Post count: 42

    Thank you very much guys!!
    Worked perfectly.

    Andrea

    #392471

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

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