Skip to content

Instantly share code, notes, and snippets.

View tomfinitely's full-sized avatar

Tom Finley tomfinitely

View GitHub Profile
@billerickson
billerickson / genesis-custom-loop-pagination.php
Created July 31, 2012 15:59
Genesis custom loop with pagination
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@joshualynch
joshualynch / my-sites-custom-super-admins.php
Created September 17, 2012 05:31
Replace WordPress "My Sites" Menu for Super Admins
<?php
/*
* Disable My Sites menu in toolbar for Super Admins & replace with custom menu
* Docs: http://codex.wordpress.org/Class_Reference/WP_Admin_Bar
*/
function jpl_remove_my_sites( $wp_admin_bar ) {
if (current_user_can('manage_network'))
@rianrietveld
rianrietveld / wpacc_skip_links.css
Created September 25, 2012 09:52
WordPress Genesis Accessible skip links
@plapier
plapier / Typekit font mixin.scss
Created October 31, 2012 18:39
Sass Mixin for typekit variation-specific font-family names
Sass Mixin for typekit variation-specific font-family names
Typekit IE6-8 Support (http://help.typekit.com/customer/portal/articles/6855-Using-multiple-weights-and-styles)
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
// Must include fallbacks for EACH typekit font — set them each as variables
//************************************************************************//
$typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2]
/**
* Post Authors Post Link Shortcode
*
* @author Bill Erickson
* @link http://www.billerickson.net/wordpress-post-multiple-authors/
*
* @param array $atts
* @return string $authors
*/
function be_post_authors_post_link_shortcode( $atts ) {
@jo-snips
jo-snips / custom-tribe-title.php
Last active September 5, 2018 07:30
The Events Calendar: Filter Tribe Events Title
add_filter('tribe_get_events_title','custom_get_events_title');
function custom_get_events_title( $depth=true ) {
global $wp_query;
$tribe_ecp = TribeEvents::instance();
$title = __('Class Schedule', 'tribe-events-calendar');
// TODO: Use the displayed dates for the title
/*
if ( tribe_is_upcoming() || isset( $_REQUEST['tribe-bar-date'] ) ) {
@jo-snips
jo-snips / genesis-events-titles.php
Created November 26, 2012 20:56
The Events Calendar: Set Event Related Page Titles in Genesis
/*-----------------------------------------------------------------------------------*/
/* Set Post Titles in Genesis
/*-----------------------------------------------------------------------------------*/
add_action('genesis_post_title','custom_do_post_title');
function custom_do_post_title() {
$tribe_ecp = TribeEvents::instance();
$title = get_the_title();
if ( strlen( $title ) == 0 )
@NicktheGeek
NicktheGeek / agentpress.php
Created January 10, 2013 20:27
Change AgentPress feature listing widget output
<?php
add_filter( 'agentpress_featured_listings_widget_loop', 'child_featured_listings_widget_loop' );
/**
* This code will replace the "," left behind in AgentPress feature listing widget after
* the listing detail IDs have been changed.
* Change the IDs to suit your needs.
*/
function child_featured_listings_widget_loop( $loop ){
@unix7
unix7 / gist:4510595
Last active March 21, 2018 14:57
Basic CSS For Formidable Form
/* Form */
.with_frm_style label{
font-size:12px;
float:none;
text-align:left;
margin:0;
padding:0;
width:auto;
}
@cdils
cdils / archive-testimonials.php
Last active April 17, 2023 20:13
This is code for a custom page template removing the standard Genesis loop and inserting a custom loop. Similar to https://gist.github.com/4684423.js, but without a grid loop.
<?php
/**
* Template Name: Testimonial Archives
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive
*/
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
add_action( 'genesis_loop', 'custom_do_loop' ); // Add custom loop