Skip to content

Instantly share code, notes, and snippets.

View melissacabral's full-sized avatar

Melissa Cabral melissacabral

View GitHub Profile
@melissacabral
melissacabral / HTML5 starter.html
Last active October 12, 2015 14:47
Simple HTML5 starting point for day 2 demo
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="description" content="DESCRIPTION" />
<title>SITE NAME - SITE DESCRIPTION</title>
<link rel="stylesheet" href="RESET_STYLESHEET_URL" media="screen" />
<link rel="stylesheet" href="STYLESHEET_URI" media="screen" />
</head>
@melissacabral
melissacabral / CPT Products CSS
Created November 8, 2012 18:44
Custom Post Type Products CSS additions
/*
== custom post type - PRODUCTS
*/
.archive-title{
margin:20px 47px;
font-size:30px;
text-align:center;
color:#CCC;
border-top: double 1px #EEE;
border-bottom: double 1px #EEE;
@melissacabral
melissacabral / wordpress loop
Created November 7, 2012 17:01
Basic wordpress loop
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- template tags and HTML go here, like this: -->
<h2><?php the_title(); ?></h2>
<?php endwhile; else:?>
<h2>Sorry, no posts found</h2>
<?php endif; ?>
@melissacabral
melissacabral / wordpress loop
Created November 7, 2012 16:59 — forked from monoooki/wordpress loop
wordpress loop desu.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
@melissacabral
melissacabral / wp-dimox-breadcrumbs.php
Last active February 17, 2022 09:13
breadcrumbs - place in functions.php and call in your theme with dimox_breadcrumbs() [Source](http://dimox.net/wordpress-breadcrumbs-without-a-plugin/)
<?php
/**
* Dimox Breadcrumbs
* http://dimox.net/wordpress-breadcrumbs-without-a-plugin/
* Since ver 1.0
* Add this to any template file by calling dimox_breadcrumbs()
* Changes: MC added taxonomy support
*/
function dimox_breadcrumbs(){
/* === OPTIONS === */
@melissacabral
melissacabral / Comment Callback Function
Last active October 12, 2015 13:18
control what each comment looks like when wp_list_comments() runs. place in functions.php
/**
* Comments.php callback function
*/
//this will control what each comment looks like when wp_list_comments() runs.
function awesome_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'div' == $args['style'] ) {
$tag = 'div';