> British Foreign Office Travel Advice wordpress plugin resources analysis

British Foreign Office Travel Advice wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name British Foreign Office Travel Advice
Version 1.0
Author Matt Hawthorne
Rating 0
Last updated 2014-10-24 02:48:00
Downloads
56
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: 0%

Post page

Delta: 0%
British Foreign Office Travel Advice plugin has no negative impact on PageSpeed score.

Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%

British Foreign Office Travel Advice plugin added 11 kB of resources to the Home page and 11 kB of resources to the sample Post page.

British Foreign Office Travel Advice plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! British Foreign Office Travel Advice plugin ads no tables to your Wordpress blog database.

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.

You can display the data in two ways:

  • Via a button which pulls through the data via ajax

  • Loads the data directly while loading the page

Directions

1) Install the plugin

2) Create a custom meta tag called ‘geo_country’ to any post, adding the country you want information for. A full list of countries is available from the BFO website.

3) There are two shortcodes you can use: [fo-advice] – gets info as the page loads (displayed in an accordion type box)

[fo-advice-button] creates a button which when clicked, will retrieve and display the data via ajax.

Demos

Info loading as the page loads

Button and ajax loading

Suggestions

Create a text widget with a title called ‘BFO Advice’ Drop the shortcode in the text area.

or

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.

<?php
/* look for a meta field called geo_country specific to the post displayed and if it's there, display a widget*/
$themeta = get_post_meta($pageID);
if (array_key_exists("geo_country",$themeta))
{
utopia_get_foreign_office();
};
function utopia_get_foreign_office(){
echo '<div class="widget-container">';
echo '<h3 class="widget-title">Foreign Office Advice</h3>';
echo do_shortcode('');
echo '</div>';
};
?>

The way the information is formatted into elements is near the bottom of index.php (line 207 onwards). You can add a title by unremarking line 208. We’ve deliberately left the code with lots of space and relatively easy to understand so you can reformat how you see fit.

Beware! The elements and their classes / IDs are tied in to the accordion. For the accordion reference and options see http://www.snyderplace.com

Donate

You can always donate as a way of saying thanks!

Resources added by plugin to Home page/Post page in kB
Total size of resources for Home page/Post page in kB
Random Theme Tests
Timeless screenshot

Timeless

by: Roam2Rome

21528
0%
MW Small screenshot

MW Small

by: mwthemes

2695
0%