FEATURE REQUEST: Tags on list/grid view

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 9 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #35685

    jakes
    Free User
    Post count: 24

    (not sure how to get describe this, but)
    Within the list/grid view of entries – where the stars, favourites, etc shows (not sidebar), would it be possible to add the tags/tag-cloud associated with the entry, so that users/visitors are able to spot the resources they’re after at a glance?

    Please

    #35757

    Paolo
    Site Admin
    Post count: 31206

    Hi Jakes,

    there is a hook that let’s you add any custom content after any listings in both listings page and widgets because they sahe the same function, so it would show in both lists (main content area and sidebar).

    That is geodir_after_listing_post_excerpt.

    It is very easy to add the tags names with a function like this:

    
    
    
    add_action('geodir_after_listing_post_excerpt' ,'geodir_my_new_listings_content');
    function geodir_my_new_listings_content($tab_index) {
    if (geodir_is_page('listing')) {
      $post_details = geodir_get_post_info($entry['ID']);
    			echo $post_details->post_tags;
    }
    }

    However adding the tags links as i believe you want, it much more complicated, because locations has to be taken into consideration to create the URLs, depending on which page the link is actually displayed.

    In that case the function would be 20 times longer and I’ve tested for 10 minutes before giving up… Stiofan would be required to create something like that.

    I’l lask him if he can have a look and provide a quick function to workaround this, but I can’t promise anything.

    Thanks

    #35758

    jakes
    Free User
    Post count: 24

    Cheers Paolo,

    I’ll give that code a go, thanks.
    Tags don’t need to be hyperlinked, only tags shown for respective entries.

    Edit:

    
    
    
      $post_details = geodir_get_post_info($entry['ID']);
      echo $post_details->post_tags;
    

    just before “<!– geodir-addinfo ends here–>” does the trick – rest of code crashes page.
    Will investigate later

    #35760

    Paolo
    Site Admin
    Post count: 31206

    In that case the code above added to your active theme functions.php will do it.

    Thanks!

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