最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

add_theme_support post-thumbnails not working

matteradmin7PV0评论

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') 
);

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far