Skip to content

Instantly share code, notes, and snippets.

View WebsiteStudents's full-sized avatar

WebsiteStudents WebsiteStudents

View GitHub Profile
@WebsiteStudents
WebsiteStudents / gist:8346c0e15ea3babdf2fb
Created April 22, 2015 18:51
WordPress Custom Theme: template tag for the "footer.php" file
<?php wp_footer(); ?>
@WebsiteStudents
WebsiteStudents / gist:8ac71833fd92477da16b
Created April 22, 2015 18:49
WordPress Custom Theme: first code for the "content.php" file
<section class="content-loop">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
@WebsiteStudents
WebsiteStudents / gist:b15bae5b3eea41dda31c
Created April 22, 2015 18:48
WordPress Custom Theme: navigation template tag for the "header.php" file
<?php wp_nav_menu(array('theme_location' => 'mainnav')); ?>
@WebsiteStudents
WebsiteStudents / gist:2833ac3671d6357eda43
Created April 22, 2015 18:45
WordPress Custom Theme: the first contents for the "header.php" file
<!DOCTYPE html>
<html>
<head>
<title><?php wp_title('|', true, 'right'); bloginfo('name'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" rel="stylesheet" />
<?php wp_head(); ?>
</head>
<body <?php body_class($class); ?>>
@WebsiteStudents
WebsiteStudents / gist:264f16bd62b80294fe38
Created April 22, 2015 18:43
WordPress Custom Theme: first contents for the "index.php" file
<?php get_header(); ?>
<?php get_template_part(content); ?>
<?php get_footer(); ?>
@WebsiteStudents
WebsiteStudents / gist:fc756035c6cd26309c05
Created April 22, 2015 18:39
WordPress Custom Theme: code to begin "style.css" file
/*
Theme Name: Custom Theme
Theme URI: http://yoursite.websitestudents.com
Description: Custom theme created from an existing HTML site.
Author: [your name]
Author URI: http://yoursite.websitestudents.com
Version: 1.0
*/
@WebsiteStudents
WebsiteStudents / gist:acfc651c04e788049d65
Created April 1, 2015 17:22
WordPress: basic child theme style.css file contents
/*
Theme Name: TwentyFifteen Child
Description: Child theme for the TwentyFifteen theme
Author: [Your name here]
Template: twentyfifteen
*/
@import url("../twentyfifteen/style.css");
/* Begin your custom CSS below */
@WebsiteStudents
WebsiteStudents / gist:60fbb037a94a0b37be11
Created January 17, 2015 20:59
HTML5 boilerplate with 'viewport' RWD and some media queries
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page with Mobile Viewport for RWD</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0" />
<style type="text/css">
@WebsiteStudents
WebsiteStudents / gist:87281daf2ad84d59bcf9
Last active August 29, 2015 14:13
HTML document "boilerplate" starting code with Eric Meyer's CSS reset, some starter styles and a couple of DIVs.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Page Title</title>
<style type="text/css">
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
@WebsiteStudents
WebsiteStudents / gist:6c917cc4696715aba049
Created January 11, 2015 23:00
Week 3: raw HTML code and content for Apollo web page
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NASA Apollo 1 Mission</title>
</head>
<body>
<h1>Apollo 1</h1>