Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在有一个功能来制作缩略图的大小:
if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); set_post_thumbnail_size(200,112); }
我想将值title=""作为帖子标题。
title=""
欢迎来到 SO。如果此答案对您有所帮助,请不要忘记接受它是正确的。
the_post_thumbnail('medium', array('title' => strip_tags(get_the_title())));
或者
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail', array('title' => strip_tags(get_the_title())) );
OBS: “设置缩略图”现在在仪表板中称为“特色图像”
好好享受!