Skip to content

Instantly share code, notes, and snippets.

<p>USA - 1 USD (US dollar) = [currencyr amount=1 from=usd to=uah] (Ukrainian hryvnia)</p>
@davidmottershead
davidmottershead / currencyr-updateddate-shortcode
Last active August 29, 2015 14:06
Shortcode function to display last updated date for currency rates in Currencyr WordPress plugin http://www.davidmottershead.com/articles/live-currency-exchange-rates-wordpress/
function currency_shortcode ()
{
global $currencyr;
return $currencyr->updated;
}
add_shortcode ('currencydate','currency_shortcode');
//Usage - exchange rates below were last updated on [currencydate]
[currencyr amount=$amount <from=$code> to=$code<$code>]
//example to express US$ in Ukrainian hryvnia
[currencyr amount=1 from=usd to=uah]
.icon-color {
color:#DBD7CA;
}
<span class="icon-file-excel icon-color"></span><a href="http://www.davidmottershead.com/wp-content/uploads/2014/07/countriesoftheworld.xlsx">Countries Of The World</a>
<span class="icon-file-excel"></span><a href="http://www.davidmottershead.com/wp-content/uploads/2014/07/countriesoftheworld.xlsx">Countries Of The World</a>
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot?68uve9');
src:url('fonts/icomoon.eot?#iefix68uve9') format('embedded-opentype'),
url('fonts/icomoon.woff?68uve9') format('woff'),
url('fonts/icomoon.ttf?68uve9') format('truetype'),
url('fonts/icomoon.svg?68uve9#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
@davidmottershead
davidmottershead / wp_get_mime_types
Created July 13, 2014 10:07
WordPress MIME types July 2014
function wp_get_mime_types() {
/**
* Filter the list of mime types and file extensions.
*
* This filter should be used to add, not remove, mime types. To remove
* mime types, use the 'upload_mimes' filter.
*
* @since 3.5.0
*
* @param array $wp_get_mime_types Mime types keyed by the file extension regex
@davidmottershead
davidmottershead / genesis-seo-title-filter
Created June 23, 2014 20:06
Filter function to modify genesis_seo_title and place an icon before the site title http://www.davidmottershead.com/articles/icon-site-title-genesis/
add_filter( 'genesis_seo_title','custom_genesis_seo_title',10,1);
function custom_genesis_seo_title ($title) {
$inside = sprintf( '<a href="%s" title="%s">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
if (is_front_page()||is_home())
{
$title = '<h1 class="site-title" itemprop="name"><span class="icon-home2"></span>'. $inside .'</h1>';
}
else
{
$title = '<p class="site-title"><span class="icon-home2"></span>'. $inside .'</p>';