Created
February 12, 2015 05:03
-
-
Save rali14/0ec4f8780f3918f9e073 to your computer and use it in GitHub Desktop.
Mindful Society
This file contains hidden or 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 | |
/** | |
* 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