hipdevteam / hip-location
简单、灵活,为Hip营销网站将位置帖子类型添加到地图中
1.2.4
2022-10-13 05:06 UTC
Requires
- composer/installers: ^1.0
- htmlburger/carbon-fields: *
- pimple/pimple: ~3.0
- twig/twig: 3.3.0
- dev-master
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- v1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.1
- 1.0.0
- 0.5.21
- 0.5.20
- 0.5.19
- 0.5.18
- 0.5.17.2
- 0.5.17.1
- 0.5.17
- 0.5.16
- 0.5.15
- 0.5.14
- 0.5.13
- 0.5.12
- 0.5.11
- 0.5.10
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.7
- 0.4.06
- 0.4.05
- 0.4.04
- 0.4.03
- 0.4.02
- 0.4.01
- 0.4.0
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-locationv2
- dev-bug_fix
- dev-update
- dev-fix_map_loading
- dev-khairul
This package is auto-updated.
Last update: 2024-08-29 22:07:04 UTC
README
此插件向WordPress添加了一个location
帖子类型,包括列出所有位置和显示单个位置的模板。
设置
激活后,在地图工作之前需要添加一个Google Map API密钥。可以在WP管理 -> 位置 -> 设置页面下的常规选项卡中添加密钥。
短代码
[ location_module ]
- 显示所有位置(包括地图)的页面部分。
[ location_module_without_map ]
- 显示所有位置的页面部分;无地图。
[ hip_location_map ]
- 显示带有所有位置图钉的地图。
[ hip_single_location_map ]
- 显示带有标记卡的单个位置的地图。此短代码需要一个必需的参数slug
,用于指定位置的别名。接受可选参数zoom
(默认为15)和height
(默认为360px)。例如:[hip_single_location_map slug="hip" zoom="12" height="500px"]
覆盖单个位置模板
包含一个默认模板,用于显示单个位置。此模板显示带有标记卡的位置的Google地图、地址、在Google上查看位置的链接、营业时间和自由格式附加信息的空间。它还利用了可以从WP管理中控制的几个设置。
如果此模板不符合您的需求,您可以在主题中或单独的插件中创建自己的模板。以下代码可以放在您的functions.php文件中,以覆盖使用的模板文件
add_filter( 'single_template', function($template) {
global $post;
if ( $post->post_type == 'location' ) {
// Replace with the path to your custom template file
$template = get_stylesheet_directory() . '/inc/location.php'
}
return $template;
}, 11 );