Skip to content

Instantly share code, notes, and snippets.

@rali14
Created February 12, 2015 05:03
Show Gist options
  • Save rali14/0ec4f8780f3918f9e073 to your computer and use it in GitHub Desktop.
Save rali14/0ec4f8780f3918f9e073 to your computer and use it in GitHub Desktop.
Mindful Society
<?php
/**
* Listify child theme.
*/
function listify_child_styles() {
wp_enqueue_style( 'listify-child', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'listify_child_styles', 999 );
/** Place any new code below this line */
function custom_listify_cover_image( $image, $args ) {
if ( ! isset( $args[ 'term' ] ) ) {
return $image;
}
$term = $args[ 'term' ];
/**
* Only edit the URL here.
*
* Do not add the name of the image to this URL.
*
* Once the URL is set upload images to your web server's directory with the name
* of each of your terms slug.
*
* Example:
* Restaurants = http://yourwebsite.com/images/directory/restaurants.jpg
*/
$url = 'mindfulsociety.co/wp-content/uploads/2015/02/';
$image = array( $url . $term->slug . '.png' );
return $image;
}
add_filter( 'listify_cover_image', 'custom_listify_cover_image', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment