Skip to content

Instantly share code, notes, and snippets.

View JLeuze's full-sized avatar

Josh Leuze JLeuze

View GitHub Profile
@JLeuze
JLeuze / meteor-slideshow.php
Created April 16, 2018 21:27
Custom slideshow template with slide links that open in a new tab/window
View meteor-slideshow.php
<?php
/* Loop template for the Meteor Slides 1.5.6 slideshow
Copy "meteor-slideshow.php" from "/meteor-slides/" to your theme's directory to replace
the plugin's default slideshow loop.
Learn more about customizing the slideshow template for Meteor Slides:
http://www.jleuze.com/plugins/meteor-slides/customizing-the-slideshow-template/
*/
@JLeuze
JLeuze / header.php
Last active August 24, 2016 19:05
Sitewide header slideshow for TwentyTwelve Theme
View header.php
<?php
/**
* The Header template for our theme
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
@JLeuze
JLeuze / header.php
Created August 20, 2016 15:59
Sitewide header slideshow for TwentyTen Theme
View header.php
<?php
/**
* Header template for our theme
*
* Displays all of the <head> section and everything up till <div id="main">.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
@JLeuze
JLeuze / header.php
Last active June 2, 2016 23:55
Homepage header slideshow for TwentyTen Theme
View header.php
<?php
/**
* Header template for our theme
*
* Displays all of the <head> section and everything up till <div id="main">.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
@JLeuze
JLeuze / header.php
Created February 6, 2016 19:04
Replace header image with slideshow for TwentyEleven Theme
View header.php
<?php
/**
* Header template for the theme
*
* Displays all of the <head> section and everything up till <div id="main">.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
@JLeuze
JLeuze / header.php
Last active February 6, 2016 19:02
Homepage header slideshow for TwentyEleven Theme
View header.php
<?php
/**
* Header template for the theme
*
* Displays all of the <head> section and everything up till <div id="main">.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
@JLeuze
JLeuze / header.php
Last active January 13, 2016 20:05
Homepage header slideshow for Twenty Sixteen theme.
View header.php
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "site-content" div.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
@JLeuze
JLeuze / meteor-slides-list.php
Created October 6, 2012 20:19
Get a linked list of slide post titles for Meteor Slides
View meteor-slides-list.php
<?php
/* Loop template for the slide posts list */
// Settings for slide list loop
global $post;
$meteor_posttemp = $post;
$meteor_count = 1;
$meteor_loop = new WP_Query( array(
@JLeuze
JLeuze / custom_functions_fix.php
Created June 22, 2012 16:15
Queries fix for Flexible theme
View custom_functions_fix.php
<?php
add_action( 'pre_get_posts', 'et_custom_posts_per_page' );
function et_custom_posts_per_page( $query ) {
global $shortname;
if ( is_admin() ) return $query;
if ( $query->is_main_query() && $query->is_category ) {
$query->set( 'posts_per_page', et_get_option( $shortname . '_catnum_posts' ) );
@JLeuze
JLeuze / remove-meteor-scripts.php
Created May 24, 2012 15:52
Plugin to remove JS and CSS for Meteor Slides when not on homepage
View remove-meteor-scripts.php
<?php /*
Plugin Name: Remove Meteor Scripts
Description: Remove JS and CSS for Meteor Slides when not needed.
Author: Josh Leuze
Author URI: http://www.jleuze.com/
Version: 1.0 */
add_action( 'template_redirect', 'disable_meteorslides_scripts' );
function disable_meteorslides_scripts() {