Skip to content

Instantly share code, notes, and snippets.

View grimicorn's full-sized avatar

Danny Holloran grimicorn

View GitHub Profile
{% comment %} My comment goes here. {% endcomment %}
{% include share.html %}
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
{% else %}
<span>&laquo; Prev</span>
{% endif %}
{% for post in paginator.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2 class="post-title">
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
{{ post.excerpt | strip_html | strip_newlines }}
</li>
{% endfor %}
@grimicorn
grimicorn / post-excerpt.html
Created August 2, 2015 01:23
Setting Up a Jekyll Blog - Part 3
{{ post.excerpt | strip_html | strip_newlines | truncate: 160 }}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@grimicorn
grimicorn / gist:7515060
Last active December 28, 2015 14:29
WP Multi File UIploader - Using The Shortcode
<!-- In The Post Editor -->
<form action="?" method="post" accept-charset="utf-8">
<label for="unique_name">Your Name:</label>
<input type="text" name="unique_name" id="unique_name" value="" placeholder="Your Name">
<!-- Accepts .jpg files only with a max file size of 3mb -->
[wp-multi-file-uploader allowed_mime_types="jpg" max_file_size="3"]
<input type="submit" name="submit" value="Submit">
</form>
<!-- END In The Post Editor -->
@grimicorn
grimicorn / wp_custom_login_log.php
Created July 13, 2012 15:07
Wordpress Custom Login Logo
// Sets custom login logo fo WP-Login.
function custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_bloginfo('template_url').'/images/logo.png) !important; }
</style>';
}
add_action('login_head', 'custom_login_logo');
@grimicorn
grimicorn / Admin_Delete_Button.php
Created July 8, 2012 12:34
Adds a delete button to the Wordpress admin bar
/***
Adds a delete button to the Wordpress admin bar
To apply this tip, simply paste the following code into your functions.php file:
Thanks to WP Engineer and WPRecepies!
**/
<?php
function wp_add_admin_bar_trash_menu() {
global $wp_admin_bar;
if ( !is_super_admin() || !is_admin_bar_showing() )
return;
@grimicorn
grimicorn / Hide_Text.css
Created July 8, 2012 12:29
Used to hide text from container useful for logos successor to -9999px method
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}