admin管理员组文章数量:1130349
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.
index.php:
<meta content="0; URL='''" 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 = '';
</script>
functions.php
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.
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.
index.php:
<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';
</script>
functions.php
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
Reset to default 0Worked for me,
add_action( 'after_setup_theme', 'headless_theme_setup' );
function headless_theme_setup() {
add_theme_support( 'post-thumbnails', array( 'post' ) );
}
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:
site/
|__build/
|_wp/
|
|__/src/
|_wp/
So the changes I made in src/ were not being compiled off the build.
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.
index.php:
<meta content="0; URL='''" 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 = '';
</script>
functions.php
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.
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.
index.php:
<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';
</script>
functions.php
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
Reset to default 0Worked for me,
add_action( 'after_setup_theme', 'headless_theme_setup' );
function headless_theme_setup() {
add_theme_support( 'post-thumbnails', array( 'post' ) );
}
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:
site/
|__build/
|_wp/
|
|__/src/
|_wp/
So the changes I made in src/ were not being compiled off the build.
本文标签: post thumbnailsCreated blank theme for REST APIfeatured image not appearing on admin side
版权声明:本文标题:post thumbnails - Created blank theme for REST API, featured image not appearing on admin side 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749060207a2309984.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论