Skip to content

Instantly share code, notes, and snippets.

View kopepasah's full-sized avatar
🤖
Solving problems with bots.

Justin Kopepasah kopepasah

🤖
Solving problems with bots.
View GitHub Profile
@kopepasah
kopepasah / 6071.md
Created May 20, 2014 12:05
Change Jetpack 3.0's Default Twitter Card Site Tag

Change Jetpack 3.0's Default Twitter Card Site Tag

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

@kopepasah
kopepasah / 6027.md
Created May 18, 2014 06:25
Change Jetpack's Related Post Count

Change Jetpack's Related Post Count

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

@kopepasah
kopepasah / 5961.md
Last active August 29, 2015 14:01
Add Jetpack Markdown Support to Custom Post Types

Add Jetpack Markdown Support to Custom Post Types

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code is free software; you can redistribute it and/or modify it under the termSSSs of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

@kopepasah
kopepasah / 6016.md
Last active October 10, 2018 01:18
Change Jetpack's Related Posts Thumbnail Size

Change Jetpack's Related Posts Thumbnail Size

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

@kopepasah
kopepasah / entypo.css
Created April 18, 2014 14:26
Less code for web font version of Entypo (also includes the CSS output).
@font-face {
font-family: 'Entypo';
src: url('entypo.eot');
src: url('entypo.eot?#iefix') format('embedded-opentype'), url('entypo.woff') format('woff'), url('entypo.ttf') format('truetype'), url('entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}
.entypo {
display: inline-block;
font-family: Entypo;
@kopepasah
kopepasah / description.md
Last active August 29, 2015 13:58
Custom Thumbnail Pagination on SlidesJS:

Custom Thumbnails on Slidesjs Pagination

Out of the box, SlidesJS does not provide the ability to add custom pagination. Although I love slides (it's my go-to for simple sliders), on a recent project I needed to ability to have small thumbnails for pagination.

With the simple addition of two attributes to the images and code the loaded callback for Slides, thumbnail pagination is possible (and simple).

A Pen by Kopepasah on CodePen.

License.

<?php
// Enqueuing and Using Custom Javascript/jQuery
function custom_load_custom_scripts() {
if ( file_exists( get_stylesheet_directory() . '/js/custom_jquery_additions.js' ) ) {
$url = get_stylesheet_directory_uri() . '/js/custom_jquery_additions.js';
} else if ( file_exists( get_template_directory() . '/js/custom_jquery_additions.js' ) ) {
$url = get_template_directory_uri() . '/js/custom_jquery_additions.js';
}
@kopepasah
kopepasah / available-modules.php
Last active August 29, 2015 13:57
One line conditional to check if a Jetpack module is active or not.
Jetpack::get_available_modules();
Array
0 => after-the-deadline
1 => carousel
2 => comments
3 => contact-form
4 => custom-css
5 => enhanced-distribution
6 => gplus-authorship
@kopepasah
kopepasah / add-submodule.bash
Last active August 29, 2015 13:57
This Gist contains code for my 'Easily Add Less CSS Pre-Processor to any WordPress Theme' tutorial on kopepasah.com.
git submodule add [email protected]:kopepasah/wp-theme-toolkit-less.git lib/less
@kopepasah
kopepasah / find.txt
Created March 11, 2014 11:33
Use TextMate to find and replace all tabbed lines with empty lines.
[\t]+[\n]