Skip to content

Instantly share code, notes, and snippets.

@alexadark
alexadark / theme.js
Created November 11, 2013 06:25
jquery: ready
jQuery(document.ready(function($)) {
$('flexslider').flexslider();
}
@alexadark
alexadark / theloop
Created November 9, 2013 16:49
WP: loop
<?php get_header(); ?>
<?php if (have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h3><?php the_title(); ?></h3>
<?php the_content( ); ?>
<hr>
<?php endwhile; else: ?>
@alexadark
alexadark / gist:7384112
Created November 9, 2013 10:32
Wordpress: loop
<?php if(have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; else: ?>
<p>There are no posts or page here</p>
<?php endif; ?>
@alexadark
alexadark / Functions.php
Created November 9, 2013 10:19 — forked from barbwiredmedia/Functions.php
Wordpress: breadcrumbs
//Bread crumbs created
function wordpress_breadcrumbs() {
$delimiter = '|';
$currentBefore = '<span class="current">';
$currentAfter = '</span>';
if ( !is_home() && !is_front_page() || is_paged() ) {
echo '<div id="crumbs">';
global $post;
if ( is_page() && !$post->post_parent ) {
echo $currentBefore;