Skip to content

Instantly share code, notes, and snippets.


John Bunka JohnBunka

View GitHub Profile
ericakfranz / genesis-facebook-sdk.php
Created Nov 24, 2015
Easily include the Facebook SDK script, useful when adding Facebook Social Plugins to your site:
View genesis-facebook-sdk.php
* Plugin Name: Genesis - Facebook SDK
* Plugin URI:
* Description: Adds the Facebook SDK script just after the opening <body> tag on Genesis Framework sites.
* Version: 1.0.0
* Author: Erica Franz
* Author URI:
* License: GPL2
bradonomics / year-archive-template.php
Last active Jan 23, 2021
Genesis Page Template displaying posts by year. Inspired by Alex Sexton's blog archives: and built using code modified from Joe Mar Aparecio:
View year-archive-template.php
* Custom Blog Loop for Bradonomics.
* Template Name: Bradonomics Blog
//* Remove standard post content output
robincornett / functions-alt.php
Last active Nov 8, 2016
Make Simple Social Icons a little more awesome with FontAwesome.
View functions-alt.php
// do NOT include the opening tag
add_filter( 'simple_social_default_glyphs', 'rgc_simple_social_icons_glyphs' );
function rgc_simple_social_icons_glyphs( $glyphs ) {
$glyphs = array(
'bloglovin' => '<span class="fa fa-heart"></span><span class="screen-reader-text">Bloglovin</span>',
'dribbble' => '<span class="fa fa-dribbble"></span><span class="screen-reader-text">Dribbble</span>',
'email' => '<span class="fa fa-envelope"></span><span class="screen-reader-text">Email</span>',
ckpicker / gist:ba9b617afdbdb3867159
Created Jan 5, 2015
Events Calendar // Filters to Override Event Label
View gist:ba9b617afdbdb3867159
add_filter( 'tribe_event_label_singular', 'event_display_name' );
function event_display_name() {
return 'XXXX';
add_filter( 'tribe_event_label_plural', 'event_display_name_plural' );
function event_display_name_plural() {
return 'XXXXs';
rxnlabs / php-wp-add-tinymce-button.php
Last active Sep 10, 2021
WordPress - Add button to TinyMCE editor in WordPress. Great for creating menus so users can add shortcodes without having to remember the syntax
View php-wp-add-tinymce-button.php
/*Add this code to your functions.php file of current theme OR plugin file if you're making a plugin*/
//add the button to the tinymce editor
function add_my_tinymce_media_button($context){
return $context.=__("
<a href=\"#TB_inline?width=480&inlineId=my_shortcode_popup&width=640&height=513\" class=\"button thickbox\" id=\"my_shortcode_popup_button\" title=\"Add My Shortcode\">Add My Shortcode</a>");
glueckpress / px-rem-cheat-sheet.css
Created May 26, 2013
Cheat sheet for rem-calculations based upon 14px and 16px.
View px-rem-cheat-sheet.css
/*! = $rembase: 14px
* hmtl { font-size: 87.5%; }
* body { font-size: 14px; font-size: 1rem; line-height: 1; }
* 4px 0.28571429rem
* 8px 0.571428571rem
* 12px 0.857142857rem
* 13px 0.928571429rem
* 14px 1rem
* 16px 1.142857143rem
surefirewebserv / simple-social-centered.css
Last active Apr 16, 2019
Center Simple Social Icons when doing responsive styles
View simple-social-centered.css
/* Align Simple Social Icons Centered */
.simple-social-icons ul.alignright,
.simple-social-icon ul.alignleft {
text-align: center;
.simple-social-icons ul.alignright li,
.simple-social-icons ul.alignleft li {
display: inline-block;
float: none;
rfair404 / gist:4150286
Created Nov 26, 2012
Rip off the Agentpress Listings Widget to enable Keyword Search
View gist:4150286
* This widget presents a search widget which uses listings' taxonomy for search fields.
* @package AgentPressTwo
* @since 2.0
* @author Russell Fair
class AgentPressTwo_Listings_Search_Widget extends WP_Widget {
function AgentPressTwo_Listings_Search_Widget() {
chrisguitarguy / default-author.php
Created Jul 2, 2012
Set a default author for posts on your WordPress site.
View default-author.php
Plugin Name: Default Author
Plugin URI:
Description: Set a default author for all posts and pages
Version: 1.0
Text Domain: default-author
Author: Christopher Davis
Author URI:
License: GPL2
JPry / remove-wpe-info.php
Last active Apr 7, 2018
Remove WP Engine info from WP Dashboard
View remove-wpe-info.php
// Remove all evidence of WP Engine from the Dashboard, unless the logged in user is "wpengine"
$user = wp_get_current_user();
if ( $user->user_login != 'wpengine' ) {
add_action( 'admin_init', 'jpry_remove_menu_pages' );
add_action( 'admin_bar_menu', 'jpry_remove_admin_bar_links', 999 );