{"id":46426,"date":"2014-03-12T08:45:39","date_gmt":"2014-03-12T08:45:39","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/position\/"},"modified":"2014-10-24T12:31:45","modified_gmt":"2014-10-24T12:31:45","slug":"position","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/position\/","author":4029377,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.4.1","stable_tag":"1.4.1","tested":"3.9.40","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"Position","header_author":"Make Do","header_description":"","assets_banners_color":"da6e8b","last_updated":"2014-10-24 12:31:45","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/makedo.in\/products\/","header_author_uri":"http:\/\/makedo.in","rating":0,"author_block_rating":0,"active_installs":0,"downloads":832,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"875904","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.3.0","1.4.0","1.4.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"875900","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"875900","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"875900","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"875900","resolution":"4","location":"assets"},"screenshot-5.png":{"filename":"screenshot-5.png","revision":"875900","resolution":"5","location":"assets"}},"screenshots":{"1":"The Bootstrap 3 compatible list, rendered using the position_list_render_bootstrap() function","2":"The Bootstrap 3 compatible view, rendered using the position_render_bootstrap() function","3":"The 'location' custom post type","4":"The options screen","5":"The 'related' meta box on an events custom post type"}},"plugin_section":[],"plugin_tags":[360,2215,351,2909,3705],"plugin_category":[42,49],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-46426","plugin","type-plugin","status-closed","hentry","plugin_tags-contact","plugin_tags-location","plugin_tags-locations","plugin_tags-map","plugin_tags-position","plugin_category-contact-forms","plugin_category-maps-and-location","plugin_committers-mwtsn"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/position_da6e8b.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/position\/assets\/screenshot-1.png?rev=875900","caption":"The Bootstrap 3 compatible list, rendered using the position_list_render_bootstrap() function"},{"src":"https:\/\/ps.w.org\/position\/assets\/screenshot-2.png?rev=875900","caption":"The Bootstrap 3 compatible view, rendered using the position_render_bootstrap() function"},{"src":"https:\/\/ps.w.org\/position\/assets\/screenshot-3.png?rev=875900","caption":"The 'location' custom post type"},{"src":"https:\/\/ps.w.org\/position\/assets\/screenshot-4.png?rev=875900","caption":"The options screen"},{"src":"https:\/\/ps.w.org\/position\/assets\/screenshot-5.png?rev=875900","caption":"The 'related' meta box on an events custom post type"}],"raw_content":"<!--section=description-->\n<p>Created by <a href=\"http:\/\/makedo.in\/\">Make Do<\/a>, this plugin will give you a custom post type for locations, apply location properties to your existing post types or associate any post type with a location.<\/p>\n <p>The plugin comes with functions that you can use to generate a loop to query locationss so you can make your own output, it also comes with a few functions that will generate Bootstrap 3 compatible lists for you.<\/p>\n <p>This function works great for adding detailed location information to <a href=\"http:\/\/wordpress.org\/plugins\/person\">people<\/a>, <a href=\"http:\/\/wordpress.org\/plugins\/occasion\">events<\/a>, organisations, or any other post type you can imagine.<\/p>\n <h4>Position features<\/h4>\n <ul>\n<li>Locations custom post type (can be disabled)<\/li>\n<li>Location settings meta box (can be enabled on any post type)<\/li>\n<li>Related location meta box (off by default, but can be enabled on any post type)<\/li>\n<li>Function to render a Google map, based on a location post code<\/li>\n<li>Function to generate loop query arguments<\/li>\n<li>Function to render a locations list<\/li>\n<li>Creates several custom images sizes for you to use in your plugin<\/li>\n<li>Output location data into your RSS feeds<\/li>\n<\/ul>\n <p>View the FAQ section for usage instructions.<\/p>\n <p>If you are using this plugin in your project <a href=\"mailto:&#x68;&#101;&#x6c;&#x6c;&#111;&#x40;&#109;&#x61;&#x6b;&#101;&#x64;&#111;&#x2e;&#x69;&#110;\">we would love to hear about it<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Backup your WordPress install<\/li>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<h4>If I want to grab the locations in my loop, what is the default custom post type name?<\/h4>\n <p>It is: 'position'<\/p>\n <h4>What are the names of all the meta information for the 'Location settings' meta box?<\/h4>\n <p>Those are:<\/p>\n <ul>\n<li>'_position_name'<\/li>\n<li>'_position_email'<\/li>\n<li>'_position_website'<\/li>\n<li>'_position_telephone'<\/li>\n<li>'_position_twitter'<\/li>\n<li>'_position_facebook'<\/li>\n<li>'_position_google'<\/li>\n<li>'_position_linkedin'<\/li>\n<li>'_position_address'<\/li>\n<li>'_position_post_code'<\/li>\n<li>'_position_map_height'<\/li>\n<\/ul>\n <h4>What are the names of all the meta information for the 'Related location' meta box?<\/h4>\n <p>That is:<\/p>\n <ul>\n<li>'_position_related'<\/li>\n<\/ul>\n <h4>What functions can I use?<\/h4>\n <p>The functions provided by this plugin are:<\/p>\n <ul>\n<li>position_query_arguements()<\/li>\n<li>position_get_map_embed()<\/li>\n<li>position_list_render_bootstrap()<\/li>\n<\/ul>\n <p>Although you will get much better results if you create your own templates using the custom meta data provided, the plugin also provides the following function that will generate a view:<\/p>\n <ul>\n<li>position_render_bootstrap()<\/li>\n<\/ul>\n <p>All of these functions accept arguments.<\/p>\n <h4>What does the position_query_arguements() function do?<\/h4>\n <p>This function provides arguments for you to filter the locations (or your own post types) creating a custom Loop. You can use it like so:<\/p>\n <pre><code>get_posts( position_query_arguements( $args ) ); <\/code><\/pre>\n <p>It accepts the following arguments as an array (or you can leave the $args empty to use the defaults):<\/p>\n <pre><code>$defaults = array(     'featured'                  =&gt; false,                           \/\/ [ true | false ] - Set to true to return posts that have the featured post custom meta data set to true     'featured_post_meta_key'    =&gt; '_position_featured',            \/\/ The custom meta field that identifies the featured post, will also accept an array     'order'                     =&gt; 'ASC',                           \/\/ [ ASC | DESC ]     'orderby'                   =&gt; 'date',                          \/\/ [ date | menu_order | title ]     'posts_per_page'            =&gt; 5,                               \/\/ Set number of posts to return, -1 will return all     'post_type'                 =&gt; 'position',                      \/\/ [ post | page | custom post type | array() ]         \n    'taxonomy_filter'           =&gt; false,                           \/\/ [ true | false ] - Set to true to filter by taxonomy     'taxonomy_key'              =&gt; '',                              \/\/ The key of the taxonomy we wish to filter by     'taxonomy_terms'            =&gt; '',                              \/\/ The terms (uses slug), will accept a string or array     'use_featured_image'        =&gt; false,                           \/\/ [ true | false ] - Set to true to only use posts with a featured image ); get_posts( position_query_arguements( $defaults ) ); <\/code><\/pre>\n <h4>How do I render the Google map? (what does position_get_map_embed() do)<\/h4>\n <p>Use the function:<\/p>\n <pre><code>position_get_map_embed( $post_id, $height = 'auto' ) <\/code><\/pre>\n <p>You can pass an int into the $height parameter for the height of the iframe, or leave it empty to use the embed height that you can set in the meta box ('_position_map_height').<\/p>\n <h4>What does the position_list_render_bootstrap() function do?<\/h4>\n <p>This function will render a Bootstrap 3 compatible list of locations. You can use it like so:<\/p>\n <pre><code>position_list_render_bootstrap( $args ); <\/code><\/pre>\n <p>It accepts all the same arguments as the <code>position_query_arguements()<\/code> function, as well as the following arguments as an array (or you can leave the $args empty to use the defaults):<\/p>\n <pre><code>$defaults = array(     'class_image'                   =&gt; '',                              \/\/ The class for the image     'class_list_item_wrapper'       =&gt; '',                              \/\/ The wrapper class for each object     'class_list_wrapper'            =&gt; '',                              \/\/ The wrapper for the entire function class     'class_media'                   =&gt; 'media',                         \/\/ The media object class     'class_media_body_wrapper'      =&gt; 'media-body',                    \/\/ The body wrapper class     'class_media_content_wrapper'   =&gt; '',                              \/\/ The content wrapper class     'class_media_heading'           =&gt; 'media-heading',                 \/\/ The heading class     'class_media_image_wrapper'     =&gt; 'pull-left',                     \/\/ The image wrapper class     'class_pagination'              =&gt; 'pager',                         \/\/ The class of the pagination ul     'content_source'                =&gt; 'excerpt',                       \/\/ [ content | excerpt ] - Choose where the testimonial comes from. The default is the content of the page, and it will fall back, unless set here.     'heading_as_link'               =&gt; true,                            \/\/ Set the heading to be a link     'id'                            =&gt; 'position_list',                 \/\/ If you want to have multiple renders, you will want to change the id each time     'image_as_link'                 =&gt; true,                            \/\/ Set the image to be a link     'image_size'                    =&gt; 'square-75',                     \/\/ [ thumbnail | medium | large | full | custom ] choose the size of the thumbnail (be default we use a custom size)     'pagination_next_label'         =&gt; 'Next \u00bb',                        \/\/ The text for the 'next' pagination button     'pagination_previous_label'     =&gt; '\u00ab Previous',                    \/\/ The text for the 'previous' pagination button     'posts_per_page'                =&gt; 5,                               \/\/ The ammount of posts you want in the list (-1 will return all)     'post_type'                     =&gt; 'position',                      \/\/ [ post | page | custom post type | array() ]         \n    'show_content'                  =&gt; true,                            \/\/ [ true | false ] - show the content     'show_heading'                  =&gt; true,                            \/\/ [ true | false ] - show the headings     'show_image'                    =&gt; true,                            \/\/ [ true | false ] - show images in the list     'show_pagination'               =&gt; true,                            \/\/ [ true | false ] - show pagination     'tag_media_heading'             =&gt; 'h4',                            \/\/ The tag to be used for the heading     'tag_media_image_wrapper'       =&gt; 'a',                             \/\/ The tag to be used for the image wrapper (if its a link, it needs to be 'a') ); position_list_render_bootstrap( $defaults ); <\/code><\/pre>\n <h4>I'm trying to use the function 'position_list_render_bootstrap()' on an archive page, but the paging doesn't work<\/h4>\n <p>You can fix that by copying the following function into your functions.php:<\/p>\n <pre><code>function position_list_pre_get_posts( $query ) {     if ( !is_admin() &amp;&amp; $query-&gt;is_post_type_archive('position') &amp;&amp; $query-&gt;is_main_query() ) {         $query-&gt;set( 'posts_per_page', 1 );     } } add_action( 'pre_get_posts', 'position_list_pre_get_posts' ); <\/code><\/pre>\n <h4>I'm trying to use the function 'position_list_render_bootstrap()' on my home page, but the friendly URL paging doesn't work<\/h4>\n <p>WordPress will not let you use the friendly paging on the home page because it confuses it with the standard post paging.<\/p>\n <p>Instead of using the <code>position_list_render_bootstrap()<\/code> function, you should use a pre_get_posts filter to change the post type of the home page posts.<\/p>\n <p>You can however still page through the list of this function, as long as you use query strings (e.g. ?page=2), but this function doesnt do that for you.<\/p>\n <h4>What does the position_render_bootstrap() function do?<\/h4>\n <p>This function will render a Bootstrap 3 compatible view of a location.  We recomend you build your own views with the meta data provided, but if you wish you can use it like so:<\/p>\n <pre><code>position_render_bootstrap( $args ); <\/code><\/pre>\n <p>You can use it with the following arguments as an array (or you can leave the $args empty to use the defaults):<\/p>\n <pre><code>$defaults = array(     'class_address_wrapper'         =&gt; '',                      \/\/ The class of the address wrapper     'class_content_wrapper'         =&gt; '',                      \/\/ The class of the content wrapper     'class_header'                  =&gt; '',                      \/\/ The class of the header tag     'class_image_wrapper'           =&gt; 'pull-right',            \/\/ The class of the image wrapper     'class_link_wrapper'            =&gt; 'pull-right',            \/\/ The class of the map link wrapper     'class_meta_label_wrapper'      =&gt; 'col-md-2',              \/\/ The class of the label wrapper     'class_wrapper'                 =&gt; 'location__wrapper',     \/\/ The class of the location wrapper     'class_meta_row'                =&gt; 'row',                   \/\/ The class of the row     'class_meta_value_wrapper'      =&gt; 'col-md-10',             \/\/ The class of the value wrapper     'class_map_wrapper'             =&gt; 'location__map',         \/\/ The class of the map wrapper     'class_title'                   =&gt; 'location__title',       \/\/ The class of the title     'id'                            =&gt; 'position',              \/\/ If you want to have multiple renders, you will want to change the id each time     'post_type'                     =&gt; 'position',              \/\/ [ post | page | custom post type | array() ]         \n    'show_address'                  =&gt; true,                    \/\/ [ true | false ] - show the address in the list     'show_content'                  =&gt; true,                    \/\/ [ true | false ] - show the post content in the list     'show_email'                    =&gt; true,                    \/\/ [ true | false ] - show the email in the list     'show_facebook'                 =&gt; true,                    \/\/ [ true | false ] - show facebook in the list     'show_google'                   =&gt; true,                    \/\/ [ true | false ] - show google+ in the list     'show_image'                    =&gt; true,                    \/\/ [ true | false ] - show images in the list     'show_link'                     =&gt; true,                    \/\/ [ true | false ] - show the larger map link in the lsit     'show_linkedin'                 =&gt; true,                    \/\/ [ true | false ] - show linkedin in the list     'show_map'                      =&gt; true,                    \/\/ [ true | false ] - show the map     'show_name'                     =&gt; true,                    \/\/ [ true | false ] - show the title     'show_post_code'                =&gt; true,                    \/\/ [ true | false ] - show the post code     'show_telephone'                =&gt; true,                    \/\/ [ true | false ] - show the telephone number     'show_twitter'                  =&gt; true,                    \/\/ [ true | false ] - show twitter in the list     'show_website'                  =&gt; true,                    \/\/ [ true | false ] - show the website url in the list     'tag_meta_label_wrapper_close'  =&gt; '&lt;\/strong&gt;&lt;\/p&gt;',         \/\/ The tag(s) you wish to close the label with     'tag_meta_label_wrapper_open'   =&gt; '&lt;p&gt;&lt;strong&gt;',           \/\/ The tag(s) you wish to open the label with     'tag_meta_value_wrapper_close'  =&gt; '&lt;\/p&gt;',                  \/\/ The tag(s) you wish to close the value with     'tag_meta_value_wrapper_open'   =&gt; '&lt;p&gt;',                   \/\/ The tag(s) you wish to open the value with     'title_format'                  =&gt; 'display',               \/\/ [ display | title ] - use the post type title, or the display name, by default the display will be used and will fall back to the title ); position_render_bootstrap( $defaults ); <\/code><\/pre>\n <h4>What custom image sizes are created by this plugin?<\/h4>\n <p>The image sizes are:<\/p>\n <ul>\n<li>'square-75' - 75 x 75<\/li>\n<li>'square-150' - 150 x 150<\/li>\n<li>'square-300' - 300 x 300<\/li>\n<li>'square-600' - 600 x 600<\/li>\n<li>'square-1200' - 1200 x 1200<\/li>\n<\/ul>\n <h4>The custom image sizes dont seem to work, help!<\/h4>\n <p>The image sizes will only take effect on images you have uploaded after this plugin has been installed, however there are other plugins out there (such as <a href=\"http:\/\/wordpress.org\/plugins\/wp-thumb\/\">WPThumb<\/a>) that will fix this for you.<\/p>\n <p>If it still isnt working, check that you have the 'GD' module installed in your PHP environment. If you havent, you can install it like so:<\/p>\n <pre><code>apt-get install php5-gd <\/code><\/pre>\n <h4>The bootstrap render isnt working, what do I need to do?<\/h4>\n <p>The plugin will only render HTML, you will need to add Bootstrap CSS and JS to your theme.<\/p>\n <h4>Can I contribute?<\/h4>\n <p>Sure thing, the GitHub repository is right here: (https:\/\/github.com\/mwtsn\/position)<\/p>\n\n<!--section=changelog-->\n<h4>1.4.1<\/h4>\n <ul>\n<li>Bug fix meta box<\/li>\n<\/ul>\n <h4>1.4.0<\/h4>\n <ul>\n<li>Hide meta boxes by default<\/li>\n<\/ul>\n <h4>1.3.0<\/h4>\n <ul>\n<li>Add custom meta to RSS feed<\/li>\n<\/ul>\n <h4>1.2.5<\/h4>\n <ul>\n<li>Minor amendments<\/li>\n<\/ul>\n <h4>1.2.4<\/h4>\n <ul>\n<li>Bug fix when using a 'featured' location <\/li>\n<\/ul>\n <h4>1.2.3<\/h4>\n <ul>\n<li>Fixed issue with Bootstrap in function names<\/li>\n<\/ul>\n <h4>1.2.2<\/h4>\n <ul>\n<li>Related meta box fix<\/li>\n<\/ul>\n <h4>1.2.1<\/h4>\n <ul>\n<li>Paging bug fixes<\/li>\n<\/ul>\n <h4>1.2.0<\/h4>\n <ul>\n<li>Added UI rendering<\/li>\n<\/ul>\n <h4>1.0.1<\/h4>\n <ul>\n<li>Minor bug fix, label on settings page<\/li>\n<\/ul>\n <h4>1.0.0<\/h4>\n <ul>\n<li>Initial WordPress repository release<\/li>\n<\/ul>","raw_excerpt":"Custom post types for locations. Customisable, link any post type to a location, or just include location properties on any post type.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/46426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=46426"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mwtsn"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=46426"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=46426"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=46426"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=46426"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=46426"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=46426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}