Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@svenhanssen
svenhanssen / articles.php
Last active December 10, 2015 06:49
Embed snippets right into your Kirbytext flavored content. Handy for including dynamic content. For example, just call (snippet: articles limit: 5) to include the articles.php snippet and limit those articles by 5.
<?php
/*
Add this file to your site/snippets directory.
All attributes defined in kirbytext.extended.php will be available right here.
*/
$articles = $pages->find( "articles" )->children()->visible()->flip()->limit( $limit );
foreach ($articles as $article):
@svenhanssen
svenhanssen / hack.sh
Created March 31, 2012 17:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@svenhanssen
svenhanssen / WP_Query.php
Created March 13, 2012 12:52
WordPress: Query Comprehensive Reference
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(