Compare Listings max number – how to change?

This topic contains 2 replies, has 3 voices, and was last updated by  Kiran 4 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #534112

    Jeff Cohan
    Expired Member
    Post count: 1

    Docs for “Compare Listings” says (emphasis mine):

    Compare up to 5 listings at one time. (max number can be changed easily)

    Question: How do I change max number?

    #534119

    Guust
    Moderator
    Post count: 29970

    I have asked a developer to have a look at your question.
    I guess there is a hook for that because there is no option in the settings.

    Thanks

    #534359

    Kiran
    Moderator
    Post count: 7069

    Hi Jeff,

    Try following PHP snippet to filter max no. of listings allowed in compare list

    
    
    /**
     * Filter max no. of listings allowed in compare list.
     */
    function gd_snippet_compare_maximum_listings( $max = 5 ) {
    	$max = 10; // Max number of listings allowed.
    
    	return $max;
    }
    add_filter( 'geodir_compare_maximum_listings', 'gd_snippet_compare_maximum_listings', 10, 1 );

    Thanks,
    Kiran

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

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

Open Support Ticket