Skip to content

Instantly share code, notes, and snippets.

@ramseyp
ramseyp / hide-editor.php
Created November 12, 2012 15:48
Hide the content editor for certain pages in WordPress
<?php
/**
* Hide editor on specific pages.
*
*/
add_action( 'admin_init', 'hide_editor' );
function hide_editor() {
// Get the Post ID.
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@jsmecham
jsmecham / jquery.points.js
Created September 8, 2011 20:15
A jQuery extension for determining the center point of an element as well as to calculate whether a given point is within an element's bounds
(function($) {
$.fn.centerPoint = function()
{
return {
x: this.position().left + (this.outerWidth(true) / 2),
y: this.position().top + (this.outerHeight(true) / 2)
}
};