Skip to content

Instantly share code, notes, and snippets.

View j-gardner's full-sized avatar

John Gardner j-gardner

View GitHub Profile
@j-gardner
j-gardner / TwentyTenSingle.php
Created May 30, 2012 15:52
TwentyTen Single.php
<?php
/* Run the loop to output the post.
* If you want to overload this in a child theme then include a file
* called loop-single.php and that will be used instead.
*/
get_template_part( 'loop', 'single' );
?>
@j-gardner
j-gardner / gist:2837780
Created May 30, 2012 17:25
TwentyTen Single Loop
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
@j-gardner
j-gardner / gist:2840631
Created May 31, 2012 02:46
Finished TwentyTen single-portfolio
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php the_post_thumbnail( 'portfolio-large' ); ?>
@j-gardner
j-gardner / gist:2840634
Created May 31, 2012 02:47
TwentyTen Post Thumbnail
<div class="entry-content">
<?php the_post_thumbnail( 'portfolio-large' ); ?>
<?php the_content(); ?>
@j-gardner
j-gardner / gist:2840638
Created May 31, 2012 02:48
Feature Tags TwentyTen single-portfolio
<div class="entry-utility">
<?php echo get_the_term_list( $post->ID, 'feature', '<div class="arconix-portfolio-tax-list"><span class="arconix-portfolio-tax-title">Features: </span>', ', ', '</div>' ); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
[portfolio terms="foo" operator="NOT IN"]
@j-gardner
j-gardner / gist:3355302
Last active October 8, 2015 15:58
tab linking
<?php
$tabid = 0;
do_shortcode( $content );
if( is_array($GLOBALS['tabs'] ) ) {
foreach ($GLOBALS['tabs'] as $tab) {
// set up tabid based on the id defined above
switch( $id ) {
@j-gardner
j-gardner / gist:4122635
Last active October 13, 2015 02:08
Add script registration filter
<?php // DO NOT include the opening php tag
add_filter( 'arconix_flexslider_reg', 'my_flexslider_args' );
function my_flexslider_args( $args ) {
$args['url'] = get_stylesheet_directory_uri() . '/jquery.flexslider-min.js';
$args['ver'] = '2.0';
return $args;
}
@j-gardner
j-gardner / gist:4565368
Last active December 11, 2015 07:18
Arconix Shortcodes - Removing the shortcodes metabox from all post types
<?php // DO NOT include the opening php tag
// Remove Shortcodes Metabox from all post types
add_filter( 'arconix_shortcodes_meta_box_post_types', '__return_empty_array' );
@j-gardner
j-gardner / gist:6467942
Last active December 22, 2015 11:48
Adding compatibility mode to Arconix Shortcodes
<?php // DO NOT include the opening php tag
define( 'ACS_COMPAT', true ); // Arconix Shortcodes Compatibility Mode