Created
October 28, 2015 02:13
-
-
Save rahularyan/c86ad0dc10ad79a48ec1 to your computer and use it in GitHub Desktop.
Add featured image support in AnsPress question
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 | |
/** | |
* Add thumbnail support in question. | |
* @parm array Question cpt args. | |
**/ | |
function my_ap_question_cpt_filter($args){ | |
$args['support'] = 'thumbnail'; | |
return $args; | |
} | |
add_filter('ap_question_cpt_args', 'my_ap_question_cpt_filter'); |
I'm wondering the same. I tried putting it in functions.php of the theme file but it doesn't work... Thanks for your help !!
Hi Rahul,
It does not work, maybe it should be "add theme support"? https://developer.wordpress.org/reference/functions/add_theme_support/
The similar issue for your reference: https://wordpress.org/support/topic/register_post_type-is-not-supporting-thumbnail/
would you please improve code?
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Where should I add this to the plug in?
Cheers