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
function custom_taxonomy_post_class( $classes, $class, $ID ) { | |
$taxonomy = 'pcategory'; | |
$terms = get_the_terms( (int) $ID, $taxonomy ); | |
if( !empty( $terms ) ) { | |
foreach( (array) $terms as $order => $term ) { |
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: GPP Bulk Convert Post Meta Once | |
* Plugin URI: http://graphpaperpress.com | |
* Description: Converts post meta from one key format to another | |
* Author: Thad Allender | |
* Author URI: http://graphpaperpress.com | |
* Version: 1.0 | |
* Text Domain: gpp |
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 theme version number from WP_Theme object (cached) | |
*/ | |
function gpp_get_theme_version() { | |
$theme_file = get_template_directory() . '/style.css'; | |
$theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) ); | |
return $theme->get( 'Version' ); |
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
function my_excerpt_length( $length ) { | |
return 36; | |
} | |
add_filter( 'excerpt_length', 'my_excerpt_length' ); |
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
function new_excerpt_more( $more ) { | |
return '…'; | |
} | |
add_filter( 'excerpt_more', 'new_excerpt_more' ); |
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
.sell-media .sell-media-grid { width: 18%; } | |
.sell-media .sell-media-grid:nth-child(5n) { margin-right: 0; } | |
.sell-media .sell-media-grid:nth-child(3n), .sell-media .sell-media-grid .end { margin-right: 2%; } | |
.sell-media .sell-media-grid:nth-child(5n+1) { clear: left; } | |
.sell-media .sell-media-grid:nth-child(3n+1) { clear: 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
.fromblog-post, .blog-grid .hentry { | |
width: 32%; | |
} | |
.fromblog-post:nth-child(3n+1){ | |
clear:left; | |
} |
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
/* | |
Theme Name: Stock Photography Child | |
Theme URI: http://graphpaperpress.com/themes/stock-photography-child/ | |
Description: Stock Photography Child Theme | |
Author: Thad Allender | |
Author URI: http://thadallender.com | |
Template: stock-photography | |
Version: 1.0.0 | |
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready | |
Text Domain: stock-photography-child |
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
/** | |
* Resize an image to specified dimensions | |
* @return (string) path to product image or feature image | |
*/ | |
function my_resize_image( $post_id=null, $width=null, $height=null, $crop=true ) { | |
// get path to featured image | |
$featured_image_id = get_post_thumbnail_id( $post_id ); | |
$featured_image_path = get_attached_file( $featured_image_id ); |
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: Sell Media Continue Shopping Filter | |
* Plugin URI: https://graphpaperpress.com/plugins/sell-media/ | |
* Description: Filter to Sell Media "Continue shopping" links | |
* Version: 1.0.0 | |
* Author: Thad Allender | |
* Author URI: https://graphpaperpress.com | |
* Author Email: support@graphpaperpress.com | |
* Text Domain: sell_media |
OlderNewer