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 Textpattern by Patrick Lefevre
Simple Wordpress Loop
<?php
if (have_posts()) :
while (have_posts()) :
the_post();
the_content();
endwhile;
endif;
?>
Added to WordPress by Thilo Thamm
jQuery Action
<script type="text/javascript">
$(document).ready(function() {
/*place jQuery actions here*/
<<**SelectionInsertionPlaceholder**>>
});
</script>
Added to JS by Matthew Hunt
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 © ' . $start . ' - ' . date('Y') . ', all rights reserved' : 'Copyright © ' . $start . ', all rights reserved') );
?>
Added to PHP by Patrick Lefevre
IE Conditional Comments
<!--[if IE]>
<link rel="stylesheet" media="screen" type="text/css" href="<<**SelectionInsertionPlaceholder**>>" />
<![endif]-->
Added to HTML by Craig Hobson
Clearfix
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}