Differentiate Claimed and unClaimed Listings

This topic contains 6 replies, has 4 voices, and was last updated by  Paolo 6 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #402196

    Derek Brown
    Expired Member
    Post count: 28

    Is there a hook with which I can target claimed as opposed to unclaimed listings? The reason is because we want to show Claimed listings as a grid, but unclaimed listings as just a list to further incentivize potential customers/listings to claim their listings.

    That said, I am recommending an upgrade that adds this choice to the GD > Popular Post View and other listing widgets

    Thaks.

    #402200

    Alex Rollin
    Moderator
    Post count: 27815

    Take a look here.

    https://wpgeodirectory.com/codex/codex_project/geodir_claim_listing/

    Let us know how it works for you; it sounds like a great project!

    Feel free to make a recommendation here: https://wpgeodirectory.com/requests/

    #402295

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You can use this hook ‘geodir_post_view_extra_class’ to add extra clases to identify it and style it as you wish.

    Stiofan

    #402315

    Derek Brown
    Expired Member
    Post count: 28

    Thank you. Can you supply me with a sample snippet or small clue of what I would do to make this happen?

    #402347

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Not tested but this is how i would tackle it, first make the default view “list view” then we will set the ones that are claimed to show as a grid leaving the unclaimed ones as a listview.

    
    
    add_action('geodir_post_view_extra_class','_my_gd_listing_extra_clases');
    function _my_gd_listing_extra_clases($class){
        global $post;
    
        if(isset($post->claimed) && $post->claimed){
            $class .= " geodir-gridview gridview_onehalf ";
        }
    
        return $class;
    }

    Thanks,

    Stiofan

    #402348

    Derek Brown
    Expired Member
    Post count: 28

    Thanks Alex. I went to the Requests page and was able to vote on some great requests, but am not seeing a button to ADD a request?

    #402354

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you can only add new requests if you still have votes to cast.

    Thanks

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

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

Open Support Ticket