Skip to content

Instantly share code, notes, and snippets.

View smonteverdi's full-sized avatar

Sean Monteverdi smonteverdi

View GitHub Profile
@smonteverdi
smonteverdi / gist:1993860
Created March 7, 2012 15:41
WordPress: Menu wrapped in nav
<?php wp_nav_menu( array( 'container' => 'nav','container_id' => 'side-menu', 'container_class' => '') ); ?>
@smonteverdi
smonteverdi / gist:1993855
Created March 7, 2012 15:40
WordPress: Loop through custom post types
$args = array( 'post_type' => 'product', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
@smonteverdi
smonteverdi / gist:1993843
Created March 7, 2012 15:37
Link to Javascript in Admin
function plugin_admin_head_js() {
print "<script type='text/javascript' src='linktoyourjs.js'></script>";
}
add_action('admin_head', 'plugin_admin_head_js');
@smonteverdi
smonteverdi / gist:1993823
Created March 7, 2012 15:33
WordPress: Display Recent Posts
<?php wp_get_archives('title_li=&type=postbypost&limit=10'); ?>
@smonteverdi
smonteverdi / gist:1993724
Created March 7, 2012 15:13
HTML: HTML5 Starter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 Starter</title>
<link rel="stylesheet" href="assets/css/main.css" type="text/css" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="assets/css/main.css" type="text/css" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>