I have a blank theme purely to redirect to my custom front-end. I created a functions.php and put add_theme_support() inside it and to no avail.


<meta content="0; URL='https://headless-cms.test''" http-equiv"refresh">

<!-- just in case the meta tag is not read properly, here is plan B: a JS redirect -->
<script type="text/javascript">
  window.location = 'https://headless-cms.test';


add_action( 'after_setup_theme', 'headless_theme_setup' );
function headless_theme_setup() {
    add_theme_support( 'post-thumbnails');

// Also tried these and still didn't show

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

I refreshed the admin panel and checked under screen options and did not see it. I'm using WP 5.0.2.

2 Answers 2


Worked for me,

add_action( 'after_setup_theme', 'headless_theme_setup' );
function headless_theme_setup() {
    add_theme_support( 'post-thumbnails',  array( 'post' ) );

enter image description here

WordPress version 5.0.2


The issue was the symbolic link between my Wordpress install in my public/ and build/ directory was out of sync. I forgot to run yarn build after adding the function.

My directory structure is like this:


So the changes I made in src/ were not being compiled off the build.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.