Skip to content

Instantly share code, notes, and snippets.

View pommiegranit's full-sized avatar

Chris Knowles pommiegranit

  • Melbourne, Australia
View GitHub Profile
@pommiegranit
pommiegranit / base.twig
Last active May 31, 2021 18:50
Timber + Twig Examples
{% import 'twig/macros.twig' as macros %}
{{ function( 'get_header' ) }}
<div id="primary" class="content-area">
<div id="main" class="site-main" role="main">
{% block content %}{% endblock %}
</div><!-- #main -->
@pommiegranit
pommiegranit / fullpage_apple.css
Last active November 2, 2020 13:52
fullPage.js For WordPress
/* Style for header texts
* --------------------------------------- */
h1{
font-size: 5em;
font-family: arial,helvetica;
margin:0;
padding:0;
}
h2{
font-size: 2em;
@pommiegranit
pommiegranit / bosco_archive.php
Created August 15, 2014 02:41
WordPress theme changes when adding category featured images
<?php
/**
* @package Bosco
*/
if ( is_category() && function_exists('category_image_src')) {
$category_image = category_image_src( array( 'size' => 'full' ) , false );
} else {
$category_image = '';
}
@pommiegranit
pommiegranit / mywidget-basic.php
Last active August 30, 2018 12:54
Playing with WordPress widgets
<?php
/*
Plugin Name: My Widget
Plugin URI: http://mydomain.com
Description: My first widget
Author: Me
Version: 1.0
Author URI: http://mydomain.com
*/
<?php
/*
Plugin Name: Post Front Page
Plugin URI: http://premium.wpmudev.org
Description: Allows a post (not page) to become the front page of a WordPress site
Author: Chris Knowles
Version: 1.0
Author URI: http://twitter.com/ChrisKnowles
*/
@pommiegranit
pommiegranit / link_pdf_attachment.php
Last active May 31, 2018 08:51
Simple plugin to add a link to the top of a WordPress post to any PDF attachment
<?php
/*
Plugin Name: Global Conditional Notification
Description: Provides global notifications with conditional content
Version: 1.0
Author: Chris Knowles
Plugin URI: http://
Author URI: http://premium.wpmudev.org/blog/author/chrisdknowles/
Author: Bas Matthee
@pommiegranit
pommiegranit / gestures_init.js
Created September 8, 2014 07:48
Initialization script for Tocca js in WordPress
jQuery(document).ready(function($){
$(gestures.container).on('dbltap', function(){
jQuery(location).attr('href', gestures.destination );
}
).on('swipeleft', function() {
@pommiegranit
pommiegranit / supercharged-post-navigation.php
Last active April 14, 2017 20:44
Provides a WordPress template tag that outputs a much more eye-catching "next" post navigation
<?php
/**
* Plugin Name: Supercharged Post Navigation
* Plugin URI: http://premium.wpmudev.org/blog
* Description: Provides a much enhanced post navigation via supercharged_post_navigation function
* Version: 1.0
* Author: Chris Knowles
* Author URI: http://premium.wpmudev.org/blog/author/chrisdknowles
* License: GPL2
*/
@pommiegranit
pommiegranit / bulk-term-remover.php
Last active January 4, 2016 21:19
A plugin that adds a new "remove terms" action to the All Posts Bulk Actions menu to allow categories and terms to be removed from multiple posts
<?php
/*
Plugin Name: Bulk Term Remover
Plugin URI:
Description: Remove tags or categories from multiple posts in the post list screen
Author: Chris Knowles based on plugin by Justin Stern.
Author URI: http://premium.wpmudev.org
Version: 0.1
Original URL: http://www.foxrunsoftware.net/articles/wordpress/add-custom-bulk-action/
Original Author: Justin Stern