This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom blog pagination links | |
* | |
* @return void | |
*/ | |
function pilau_posts_nav_link() { | |
global $wp_query; | |
$max_num_pages = $wp_query->max_num_pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Begin MailChimp Signup Form --> | |
<div id="mc_embed_signup"> | |
<form action="[grab the URL from the MC form builder]" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate"> | |
<div id="field-firstname" class="field"> | |
<label for="mce-FNAME" class="assistive-text"><?php _e( 'First name' ); ?></label> | |
<input type="text" value="" name="FNAME" class="input" id="mce-FNAME" placeholder="<?php _e( 'First name' ); ?>"> | |
</div> | |
<div id="field-lastname" class="field"> | |
<label for="mce-LNAME" class="assistive-text"><?php _e( 'Last name' ); ?></label> | |
<input type="text" value="" name="LNAME" class="input" id="mce-LNAME" placeholder="<?php _e( 'Last name' ); ?>"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get data with caching | |
* | |
* Change function name, transient name, and cache timeout if necessary. | |
* Populate $my_data, obviously. | |
* "refresh" query parameter useful for manual refreshing. | |
*/ | |
function pilau_get_my_data() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Output content with a class on the first para | |
* | |
* @param string $class Default: 'intro' | |
* @return void | |
*/ | |
function pilau_the_content_first_para_class( $class = 'intro' ) { | |
$content = apply_filters( 'the_content', get_the_content() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Carousel JavaScript | |
*/ | |
/* Trigger when DOM has loaded */ | |
jQuery( document ).ready( function( $ ) { | |
// Initialize | |
pilau_carousels.wrapper = $( '#carousels' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: l3rady's CPT Structure Helper | |
Plugin URI: http://l3rady.com/projects/l3rady-cpt-structure-helper/ | |
Description: | |
Author: Scott Cariss | |
Version: 0.2.1 | |
Author URI: http://l3rady.com/ | |
Text Domain: sccptshelper | |
Domain Path: /languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is the bare minimum CSS necessary to make jQuery UI tabs "work". | |
* Obviously you'll need to do a lot more styling to make them "good" :) | |
*/ | |
.ui-tabs-hide { display: none; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
These days I prefer the Dynamic Widgets plugin (http://wordpress.org/extend/plugins/dynamic-widgets/), because | |
it can accommodate sophisticated widget display rules in a GUI that clients can use. However, the Widget Logic | |
plugin (http://wordpress.org/extend/plugins/widget-logic/) still has its place. This bit of code will add | |
a "Widget Logic generator" to the Widgets page, which is useful if you use this plugin and have some users | |
who aren't comfortable with writing the simple PHP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Override a 404 | |
* | |
* @param string $template If passed, this template will be included and | |
* the request will be terminated if the inclusion | |
* was successful | |
* @param string $type If not a 404, what type of request should this be | |
* flagged as? Must correspond to one of the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Make containing elements into links | |
* | |
* jQuery, in conjunction with two CSS classes: | |
* | |
* 'make-link' - Makes containing elements into links. Add the class '.make-link-target' | |
* to the descendant anchor that is linked to the URL you want the ancestor element to | |
* link to. The JS handles making the cursor into a pointer and adds the class 'hover' | |
* to the target anchor when the ancestor is hovered. | |
* |