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
<header id="masthead" class="site-header" role="banner"> | |
<div class="site-branding"> | |
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> | |
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> | |
</div> | |
<!-- taken from header.php in the _s theme --> |
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
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<header class="entry-header"> | |
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?> | |
</header><!-- .entry-header --> | |
</article><!-- #post-## --> |
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
<body> | |
<a href="#maincontent">Skip to main content</a> | |
... | |
<main id="maincontent> | |
<h1>Heading</h1> | |
<p>This is the first paragraph</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
class That_Word() { | |
$word = 'what you think the word means'; | |
$that_word = 'what the word really means'; | |
you_using_that_word(){ | |
$word <> $that_word; | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 class="wrapper"> | |
<div class="cat animal"> | |
<div class="head"> | |
<span class="nose"></span> | |
<div class="ears"></div> | |
<div class="stripes stripes-right"></div> | |
<div class="stripes stripes-left"></div> | |
<div class="tongue"></div> | |
</div> | |
<div class="body"> |
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
// Make an RSS Feed Link for a bbPress Topic | |
// First Create Your Function | |
function bbpress_rss() { | |
$url = "http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
echo ' <a href="' . $url . 'feed">Subscribe via RSS</a>'; | |
} | |
// Then Echo the Function |
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 date_compare($a, $b) | |
{ | |
$t1 = strtotime($a->post_date); | |
$t2 = strtotime($b->post_date); | |
return $t1 - $t2; | |
} | |
// Cloud Loop |
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 | |
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
function enqueue_my_styles() { | |
global $wp_styles; | |
// Load the main stylesheet | |
wp_enqueue_style( 'my-theme', get_stylesheet_directory_uri() . '/style.css' ); |