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: List Children | |
Plugin Author: Andy Stratton | |
Plugin URI: http://theandystratton.com | |
Author URI: http://[email protected] | |
Version: 1.0 | |
Description: Use an HTML comment (<code><!--list_children()--></code>) in post content to call wp_list_pages for sub-pages of the current page. | |
*/ |
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: Permalinker | |
Plugin Author: Andy Stratton | |
Plugin URI: http://theandystratton.com | |
Author URI: http://[email protected] | |
Version: 1.5 | |
Description: | |
*/ |
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: Append Content | |
Description: Append content to your posts/pages, useful for repetitious messaging and calls to action. Apply template to all pages/posts, only to posts, or only to pages. | |
Version: 1.0 | |
Author URI: http://theandystratton.com | |
Author: Andy Stratton <[email protected]> | |
*/ | |
class APContent { |
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
I have three custom post types that share a hierarchical custom taxonomy for Location. Root level terms are states, child terms are cities. | |
These post types are different types of "records" for this site's many "directories" if you will. I'd like to be able to share the taxonomy across all three but do the following with a core function/query/whatever: | |
Example page: | |
/post-type-1/states/ | |
Description: | |
Shows a listing of all states (root-level terms) that have been assigned to a post with the type "post-type-1" |
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 | |
// | |
// Assumption: we have two post types, "books" and "videos" and a shared hierarchical taxonomy called "library-section" | |
// | |
/* | |
* Pulls all non-empty terms for a given post type. | |
* | |
* @param $taxonomy The name of the taxonomy, e.g. "library-section" | |
* @param $post_type The name of the post type, e.g. "book" |
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
<!-- Highlighted Providers --> | |
<div id="content" class="clearfix"> | |
<h1>Highlighted Providers</h1> | |
<ul class="hlprovide clearfix"> | |
<?php | |
// Set the page to be pagination | |
$paged = get_query_var('paged') ? get_query_var('paged') : 1; | |
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
<table id="optional-unique-id" class="content-table"> | |
<thead> | |
<tr> | |
<th>Heading 1</th> | |
<th>Heading 2</th> | |
<th>Heading 2</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> |
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: WP Maintainer 1and1 Server Fix | |
Author: theandystratton | |
Author URI: http://wpmaintainer.com | |
Description: Attempts to clean up some server environment issues with PHP to stop Strict Standards warnings from displaying in production. | |
*/ | |
add_action( 'admin_init', 'wpm_admin_init' ); | |
add_action( 'init', 'wpm_supress_public_errors' ); |
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: Add Page Revisions | |
Author: theandystratton | |
Author URI: http://sizeableinteractive.com | |
Description: Adds post type support for revisions to pages. | |
*/ | |
add_action( 'init', 'szbl_add_page_revision_support' ); | |
function szbl_add_page_revision_support() | |
{ |
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 | |
function utm_welcome_redirect() { | |
// redirect anyone that is not logged in to /welcome | |
if ( !is_user_logged_in() ) | |
{ | |
wp_redirect( site_url( '/welcome' ), 303 ); | |
die; | |
} | |
else |
OlderNewer