{"id":877,"date":"2025-03-24T14:27:55","date_gmt":"2025-03-24T14:27:55","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-do-i-allow-more-than-5-listings-to-be-compared\/"},"modified":"2025-04-03T15:24:15","modified_gmt":"2025-04-03T14:24:15","slug":"how-do-i-allow-more-than-5-listings-to-be-compared","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/compare-listings\/how-do-i-allow-more-than-5-listings-to-be-compared\/","title":{"rendered":"How do I allow more than 5 listings to be compared?"},"content":{"rendered":"\n<p>By default, the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/addons\/compare-listings\/\">Compare Listings extension<\/a> compares maximum 5 listings.<\/p>\n\n\n\n<p>You can increase this using the following code:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks mb-3\"><code class=\"language-php\">\/**\n * Filter max no. of listings allowed in compare list.\n *\/\nfunction gd_snippet_compare_maximum_listings( $max = 5 ) {\n\t$max = 10; \/\/ Max number of listings allowed.\n\n\treturn $max;\n}\nadd_filter( &#039;geodir_compare_maximum_listings&#039;, &#039;gd_snippet_compare_maximum_listings&#039;, 10, 1 );<\/code><\/pre>\n\n\n\n<div class=\"wp-block-blockstrap-blockstrap-widget-alert d-flex align-items-center fade show alert alert-info mb-3\" role=\"alert\"><span class=\"fas fa-info-circle me-2\"><\/span><span class=\"flex-grow-1\">We recommend using the <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/useful-plugins\/code-snippets-plugin\/\">Code Snippets<\/a> plugin to add snippets to your site.&nbsp;<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>By default, the Compare Listings extension compares maximum 5 listings. You can increase this using the following code:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[213,420],"class_list":["post-877","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-extensions-features","gd_placecategory-compare-listings"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=877"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/877\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=877"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=877"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}