Coda Clips

Respect plural when displaying comment count number

<txp:if_comments><p class="comments-nbr"><txp:php>
global $thisarticle;
$nbr = comments_count(array());
$nbr > 1 ? $plural = 's' : '';
echo( ($nbr == 0 ? '' : ($nbr > 1 ? $nbr.' comment' : $nbr.' comment'.$nbr) );
</txp:php></p></txp:if_comments>

Added to by Patrick Lefevre

Install Clip


Simple Wordpress Loop

<?php
if (have_posts()) :
	while (have_posts()) :
		the_post();
		the_content();
	endwhile;
endif;
?>

Added to by Thilo Thamm

Install Clip


PHP Include

<?php include('<<**SelectionInsertionPlaceholder**>>'); ?>

Added to by Matthew Hunt

Install Clip


jQuery Action

<script type="text/javascript">
$(document).ready(function() { 
/*place jQuery actions here*/ 
<<**SelectionInsertionPlaceholder**>>
}); 
</script>

Added to by Matthew Hunt

Install Clip


Start and current copyright year dates

<?php
// usage: place your start date into $start variable i.e. $start = '2008'
$start = '<<**SelectionInsertionPlaceholder**>>';
echo( ($start < date('Y') ? 'Copyright &copy; ' . $start . ' - ' . date('Y') . ', all rights reserved' : 'Copyright &copy; ' . $start . ', all rights reserved') );
?>

Added to by Patrick Lefevre

Install Clip


IE Conditional Comments

<!--[if IE]>
	<link rel="stylesheet" media="screen" type="text/css" href="<<**SelectionInsertionPlaceholder**>>"  />
<![endif]-->

Added to by Craig Hobson

Install Clip


Clearfix

.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

Added to by Toby

Install Clip


@import CSS

<style type="text/css"> @import "<<**SelectionInsertionPlaceholder**>>"; </style>

Added to by Sam Brown

Install Clip


Sponsored Links: