{"id":33213,"date":"2014-12-19T15:50:50","date_gmt":"2014-12-19T15:50:50","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-post-distance-filter\/"},"modified":"2015-03-05T14:36:48","modified_gmt":"2015-03-05T14:36:48","slug":"wp-post-distance-filter","status":"closed","type":"plugin","link":"https:\/\/hsb.wordpress.org\/plugins\/wp-post-distance-filter\/","author":14168264,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.1","stable_tag":"trunk","tested":"","requires":"","requires_php":"","requires_plugins":"","header_name":"WordPress Post Distance Filter","header_author":"Nik Sudan","header_description":"","assets_banners_color":"","last_updated":"2015-03-05 14:36:48","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/NikSudan\/wp-post-distance-filter\/","header_author_uri":"http:\/\/niksudan.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1480,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>-<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1445,5518,2236,2215,166],"plugin_category":[49],"plugin_contributors":[126913],"plugin_business_model":[],"class_list":["post-33213","plugin","type-plugin","status-closed","hentry","plugin_tags-archive","plugin_tags-distance","plugin_tags-filter","plugin_tags-location","plugin_tags-posts","plugin_category-maps-and-location","plugin_contributors-niksudan","plugin_committers-niksudan"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-post-distance-filter.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Filter posts by distance from a specified location.<\/p>\n\n<p>This plugin implements simplistic functionality to WordPress posts by enabling archives to be sorted via distances from a specified location when certain URL parameters are detected. You are able to show how far the post's distance is, and restrict results by a certain radius.<\/p>\n\n<p>Supports various units of measurement and is customisable too.<\/p>\n\n<p>Examples of use could be a job search or a store locator.<\/p>\n\n<!--section=installation-->\n<h4>Setup<\/h4>\n\n<p>Upload the <code>wp-post-distance-filter<\/code> folder to your plugins directory, then activate the plugin in the Plugins menu. An option should appear under Settings.<\/p>\n\n<h4>Changing Options<\/h4>\n\n<p>On the options page you'll have a few settings that you can change to make the plugin work to your liking.<\/p>\n\n<ul>\n<li>You can disable all location functionality by disabling it<\/li>\n<li>You can change the unit of measurement<\/li>\n<li>You can change the URL parameters<\/li>\n<li>You can change the name of various <code>meta_keys<\/code> that the plugin uses when calculating the distance for each post<\/li>\n<\/ul>\n\n<h4>Specifying Post Locations<\/h4>\n\n<p>To make a post able to be filtered, you must specify the location using a custom field. Enable this at the top of the page.<\/p>\n\n<p>Then enter the name of your location <code>meta_key<\/code> and specify the value you want it to show. After updating the post, two more custom fields should appear - the lat and lng keys if done correctly.<\/p>\n\n<h4>Filtering Posts<\/h4>\n\n<p>For any archive page, if the URL location parameter is specified, it will order by distance. You can limit the number of results using the URL radius parameter.<\/p>\n\n<p>You can show distance information using <code>the_distance();<\/code> and <code>get_the_distance();<\/code> within the wordpress loop.<\/p>\n\n<pre><code>if (have_posts()) : while (have_posts()) : the_post();\n\n    the_title();\n    the_content();\n    the_distance();\n\nendwhile; endif;\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>My posts aren't filtering<\/dt>\n<dd><p>Make sure that your URL parameters are correct and the plugin is enabled.<\/p><\/dd>\n<dt>The latitude and longitude aren't calculating<\/dt>\n<dd><p>Make sure nothing else is using the post's lat and lng meta_keys. If they are, consider changing their names on the options page.<\/p><\/dd>\n<dt>My posts's aren't showing up<\/dt>\n<dd><p>Make sure that you've specified a location<\/p><\/dd>\n<dt>I can't see the custom field for location<\/dt>\n<dd><p>You need to enable the custom field option by clicking the post dropdown at the very top of the page.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Nest plugin under the Settings tab instead<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Improved options page<\/li>\n<li>Latitude and longitude postmeta are now editable<\/li>\n<li>Bugfixes<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Naming conventions<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Filter posts by distance","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/33213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=33213"}],"author":[{"embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/niksudan"}],"wp:attachment":[{"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=33213"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=33213"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=33213"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=33213"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=33213"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=33213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}