Created
September 3, 2013 17:51
-
-
Save robneu/6427235 to your computer and use it in GitHub Desktop.
If you've noticed that since the latest Genesis 2.0 update all of your blog posts have featured images even if you haven't set them, it's because of a new feature added in Genesis 2.0. Lots of people like this, but some people might not want to automatically set fallback images for their posts. This allows you to disable the fallback image.
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 | |
/** | |
* The latest version of Genesis sets a fallback image | |
* for posts that don't have a featured image set. | |
* This disables the feature. | |
* | |
* @author FAT Media <http://youneedfat.com> | |
* @copyright Copyright (c) 2013, FAT Media, LLC | |
* @license GPL-2.0+ | |
*/ | |
add_filter( 'genesis_get_image_default_args', 'prefix_no_image_fallback' ); | |
/** | |
* Disable the featured image fallback | |
* added in Genesis 2.0. | |
* | |
* @uses genesis_get_image_default_args() | |
*/ | |
function prefix_no_image_fallback( $args ) { | |
$args['fallback'] = ''; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment