Skip to content

Instantly share code, notes, and snippets.

<?php get_header(); ?>
<div id="primary" class="content-area">
<section id="content" class="container" role="main">
<div id="article-grid">
<div class="entries category-split"></div>
<?php if ( have_posts() ) : ?>
<?php $categories = get_categories('hide_empty=1'); foreach ($categories as $category) : query_posts('showposts=2&cat='.$category->cat_ID); while(have_posts()){ the_post(); ?>
<article class="<?php if ( in_category( 'featured' )) { echo ' featured entries'; } else { echo ' normal entries'; } ?>">
<a href="<?php the_permalink(); ?>"><?php if ( in_category( 'featured' )) { echo the_post_thumbnail('home_thumbmail'); } else { echo the_post_thumbnail('level_two'); } ?></a>
<h3><?php
<?php get_header(); ?>
<div id="primary" class="content-area">
<section id="content" class="container" role="main">
<div id="article-grid">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article class="<?php if ( in_category( 'featured' )) { echo ' featured entries'; } else { echo ' normal entries'; } ?>">
<a href="<?php the_permalink(); ?>"><?php if ( in_category( 'featured' )) { echo the_post_thumbnail('home_thumbmail'); } else { echo the_post_thumbnail('level_two'); } ?></a>
<h3><?php
$category = get_the_category();
function var_slide_color(){
$black = get_post_meta($post->ID, 'black', true);
$white = get_post_meta($post->ID, 'white', true);
wp_register_style( 'white', get_template_directory_uri() . '/white.css');
wp_register_style( 'white', get_template_directory_uri() . '/black.css');
if ($white) {
wp_enqueue_style('white');
echo get_post_meta($post->ID, 'white', true);
}
elseif ($black)
@dannymichel
dannymichel / gist:4079534
Created November 15, 2012 16:27
Orbit slideshow javascript
/*
* jQuery Orbit Plugin 1.4.0
* www.ZURB.com/playground
* Copyright 2010, ZURB
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function ($) {
<?php
global $post;
$placeholder_args = array( 'post_type' => 'slides', 'posts_per_page'=>1 );
$loop_slides_placeholder = new WP_Query( $placeholder_args );
if ( $loop_slides_placeholder->have_posts() ) : $postCount = 1; while ( $loop_slides_placeholder->have_posts() ) : $postCount++; ?>
<div <?php if($postCount == 1) { ?>id="featured_placeholder"<?php } else { ?>class="featured"<?php } ?> >
<?php endwhile; endif; ?>
<?php
$args = array( 'post_type' => 'slides', 'posts_per_page'=>9999 );
$loop_slides = new WP_Query( $args );
@dannymichel
dannymichel / gist:4133215
Created November 22, 2012 22:51
OpenGraph wp_head
add_action('wp_head', 'opengraph_on_single');
function opengraph_on_single() {
if ( is_single() ) {
global $post;
setup_postdata( $post );
echo '<meta property="og:type" content="article" />
<meta property="og:title" content="' . esc_attr( get_the_title() ) . '" />
<meta property="og:url" content="' . get_permalink() . '" />
<meta property="og:description" content="' . esc_attr( get_the_excerpt() ) . '" />';
.bricks{position:relative;}
.brick{margin-bottom:20px;}
.brick ul li.taxonomy{font-style:italic;margin:5px 0;}
.brick h3.entry-title{margin:0;}
.brick ul.categories{margin:0;padding:0;}
.expo_wrap{position:absolute;z-index:1;height:100%;width:100%;top:0;left:0;padding:9px;background:#fff;display:none;}
<ul class="row bricks clearfix">
$(document).ready(function(){
$('.bricks .brick').hover(
function(){
$(this).css('display','block');
},
function(){
$(this).css('display','none');
}
);
});
i have a file called wantbtn.php that has this in it
<?php $wantclick = mysql_query("INSERT INTO user (itemtype, totalcost, karmacost, imagename. namebrand, wantedstatus)
SELECT itemtype, totalcost, karmacost, imagename. namebrand, wantedstatus
FROM allitems")
or die(mysql_error());
?>
when you click wantIt, i want the above to happen
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="autohint" >
<bool>false</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>