add_theme_support post-thumbnails not working

I tried to add thumbnail support to my themeadd_theme_support( 'post-thumbnails', array( 'post', &

I tried to add thumbnail support to my theme

add_theme_support( 'post-thumbnails', 
     array( 'post', 'page', 'service', '100', '90') 
);

I tried to add thumbnail support to my theme

add_theme_support( 'post-thumbnails', 
     array( 'post', 'page', 'service', '100', '90') 
);
Share Improve this question edited Mar 23, 2019 at 14:45 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Mar 23, 2019 at 10:02 ah jonyah jony 11 silver badge2 bronze badges 1
  • what are 100 and 90? Which hook is used to call this code? – Qaisar Feroz Commented Mar 23, 2019 at 10:30
Add a comment  | 

1 Answer 1

Reset to default 1

Have a look at this documentation.

This feature must be called before the init hook is fired. That means it needs to be placed directly into functions.php or within a function attached to the after_setup_theme hook. For custom post types, you can also add post thumbnails using the register_post_type() function as well.

TRY this

add_theme_support( 'post-thumbnails', 
     array( 'post', 'page', 'service') 
);

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745663809a4638999.html

相关推荐

  • add_theme_support post-thumbnails not working

    I tried to add thumbnail support to my themeadd_theme_support( 'post-thumbnails', array( 'post', &

    5小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信