British Foreign Office data includes information on safety and security, terrorism, local laws and customs, entry requirements, health and other aspects of travel for countries across the globe.
英国外交部的数据包括有关安全和保安,恐怖主义,当地法律和习俗,入境要求,健康以及全球其他国家旅行方面的信息。 p>
You can display the data in two ways:
您可以通过两种方式显示数据: p>
ul>
Directions
方向 h3>
1) Install the plugin
1)安装插件 p>
2) Create a custom meta tag called ‘geo_country’ to any post, adding the country you want information for.
2)在任何帖子中创建一个名为“ geo_country”的自定义元标记,并添加您要获取信息的国家/地区。
A full list of countries is available from the BFO website.
可以从 BFO网站获得国家的完整列表。 p>
3) There are two shortcodes you can use:
3)您可以使用两种简码:
[fo-advice] – gets info as the page loads (displayed in an accordion type box)
[fo-advice] –在页面加载时获取信息(在手风琴类型框中显示) p>
[fo-advice-button] creates a button which when clicked, will retrieve and display the data via ajax.
[fo-advice-button]创建一个按钮,单击该按钮将通过ajax检索并显示数据。 p>
Demos
Demos h3>
Info loading as the page loads
页面加载时信息加载 p>
Button and ajax loading
按钮和ajax加载 p>
Suggestions
建议 h3>
Create a text widget with a title called ‘BFO Advice’
创建一个标题为“ BFO Advice”的文本小部件。
Drop the shortcode in the text area.
将简码放在文本区域。 p>
or
或 p>
Drop the code below into your widgets area of your code.
将下面的代码拖放到代码的小部件区域。
It will only display a widget if the meta tag ‘geo_country’ is detected.
仅在检测到元标记“ geo_country”时才会显示小部件。 p>
<?php/* look for a meta field called geo_country specific to the post displayed and if it's there, display a widget*/
/ *查找特定于所显示帖子的名为geo_country的元字段,如果存在,则显示小部件* /
$themeta = get_post_meta($pageID);
$ themeta = get_post_meta($ pageID);
if (array_key_exists("geo_country",$themeta))
如果(array_key_exists(“ geo_country”,$ themeta))
{
{
utopia_get_foreign_office();
utopia_get_foreign_office();
};
};
function utopia_get_foreign_office(){
函数utopia_get_foreign_office(){
echo '