如何为 "post don't have featured image" 编写 if 语句
How to write if statement for "post don't have featured image"
如果 post 没有特色图片,我该如何告诉 Wordpress 插入内容。我不能使用 if-else。我只需要使用if,所以如果"post don't have featured image"然后我会添加做什么。
我在想:
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail(' false ')) ) { ?>
但上面的方法不起作用...
以上代码将在特定页面进入循环。
请注意我完全是菜鸟,也不是编码员,所以请给我详细的解释如何做某事。非常感谢。
如果 post 没有特色图片,我该如何告诉 Wordpress 插入内容。我不能使用 if-else。我只需要使用if,所以如果"post don't have featured image"然后我会添加做什么。
我在想:
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail(' false ')) ) { ?>
但上面的方法不起作用...
以上代码将在特定页面进入循环。
请注意我完全是菜鸟,也不是编码员,所以请给我详细的解释如何做某事。非常感谢。