This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<?php | |
require($_SERVER['DOCUMENT_ROOT'] . '/wordpress/wp-load.php'); | |
$args = array( | |
// 'cat' => 3, // Only source posts from a specific category | |
'posts_per_page' => 2 // Specify how many posts you'd like to display | |
); | |
$latest_posts = new WP_Query( $args ); | |
if ( $latest_posts->have_posts() ) { | |
while ( $latest_posts->have_posts() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond %{HTTP_HOST} !^www\.newdomain\.co.uk | |
RewriteRule (.*) http://www.newdomain.co.uk/$1 [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="tel:0800123456" onclick="_gaq.push(['_trackEvent','Phone Call Tracking','Click/Touch','Footer']);"> | |
0800123456 | |
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<meta charset="UTF-8"> | |
<title>Example Google Map</title> | |
</head> | |
<body> | |
<div id="map-canvas" style="height:400px; width:600px;"></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: My Widget Plugin | |
Plugin URI: http://twitter.com/jamesbavington | |
Description: A simple plugin that adds a simple widget | |
Version: 0.1 | |
Author: bavington | |
Author URI: http://twitter.com/jamesbavington | |
License: GPL2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function atfi_settings_link($links, $file) { | |
$plugin_file = basename(__FILE__); | |
if (basename($file) == $plugin_file) { | |
$settings_link = '<a href="options-general.php?page=atfi">Settings</a>'; | |
array_unshift($links, $settings_link); | |
} | |
return $links; | |
} | |
add_filter('plugin_action_links', 'atfi_settings_link', 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
header('Retry-After: Sat, 8 Oct 2011 18:27:00 GMT'); //How long before you estimate your website will be back. | |
?> | |
<!DOCTYPE HTML> | |
<html> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/offline\.php$ | |
RewriteRule ^(.*)$ /offline.php [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div itemscope itemtype="http://schema.org/Organization"> | |
<a itemprop="url" href="http://www.yourdomain.co.uk/"> | |
<img itemprop="logo" src="http://www.yourdomain.co.uk/logo.png" alt="Company Name ALT Text" /> | |
</a> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function last_updated_code() { | |
return "<p>This post was last edited on ".get_the_modified_date()." by ".get_the_modified_author()."</p>"; | |
} | |
add_shortcode( 'lastupdated', 'last_updated_code' ); | |
?> |
OlderNewer