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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>The HTML5 Herald</title> | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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 | |
define('DB_NAME', 'database_name_here'); | |
define('DB_USER', 'username_here'); | |
define('DB_PASSWORD', 'password_here'); | |
define('DB_HOST', 'localhost'); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
// salt security keys, see https://api.wordpress.org/secret-key/1.1/salt/ |
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
.box-sizing { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.border-radius { | |
padding: 10px; | |
-webkit-border-radius: 15px; |
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
// adding blogname to body_class(), | |
// see http://www.be-studios.com/blog/2012/11/wordpress-multisite-adding-blogname-to-body_class/ | |
add_filter('body_class', 'multisite_body_classes'); | |
function multisite_body_classes($classes) { | |
$id = get_current_blog_id(); | |
$slug = strtolower(str_replace(' ', '-', trim(get_bloginfo('name')))); | |
$classes[] = $slug; | |
$classes[] = 'site-id-'.$id; | |
return $classes; |
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
<? | |
if(isset($_get['order']) == 'asc'){ | |
query_posts('order=asc'); | |
}else if(isset($_get['order']) == 'desc'){ | |
query_posts('order=desc'); | |
} | |
?> | |
<a href="?order=ASC">Ascending</a> | |
<a href="?order=DESC">Descending</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
function is_tree($pid) | |
{ | |
global $post; | |
$ancestors = get_post_ancestors($post->$pid); | |
$root = count($ancestors) - 1; | |
$parent = $ancestors[$root]; | |
if(is_page() && (is_page($pid) || $post->post_parent == $pid || in_array($pid, $ancestors))) | |
{ |
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
<? | |
if(isset($_get['order']) == 'asc'){ | |
query_posts('order=asc'); | |
}else if(isset($_get['order']) == 'desc'){ | |
query_posts('order=desc'); | |
} | |
?> | |
<a href="?order=ASC">Ascending</a> | |
<a href="?order=DESC">Descending</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
<?php | |
$currentdate = date('Y-m-d'); | |
$mydate = '2015-02-08'; | |
if($currentdate >= $mydate) { | |
?> | |
<h1>later than mydate</h1> | |
<?php } else { ?> | |
<h1>earlier than mydate</h1> | |
<?php } ?> |
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
<!-- load a random image --> | |
<figure> | |
<img src="/images/visual-<?php echo(rand(1,5)); ?>" /> | |
</figure> | |
<!-- Display random snippet --> | |
<?php | |
$snippet[] = '<h2>Snippet 1</p>'; |
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
// changing default wordpres email settings | |
add_filter('wp_mail_from', 'new_mail_from'); | |
add_filter('wp_mail_from_name', 'new_mail_from_name'); | |
function new_mail_from($old) { | |
return '[email protected]'; | |
} | |
function new_mail_from_name($old) { | |
return 'MAP BioPharma'; | |
} |
OlderNewer