滚动至顶部

页面性能信息:

页面加载时间: 0.478 秒

内存使用: 24 MB

数据库查询次数: 64

加载的样式表数量: 395

加载的脚本数量: 239

页面图片信息:

图片ID图片标题类型关联文章URL地址预览
983image-20251015215947270文章缩略图wordpress后台添加菜单-使用默认样式https://haoyelaiga.com/wp-content/uploads/2025/10/image-20251015215947270-150x150.webp
917image-20251013085420559文章缩略图WordPress自动提取文章第一张图片为封面特色图片https://haoyelaiga.com/wp-content/uploads/2025/10/image-20251013085420559-150x150.webp
897image-20251008115246404文章缩略图使用wpAPI上传图片到WordPress媒体库和设为特色封面图片的项目demohttps://haoyelaiga.com/wp-content/uploads/2025/10/image-20251008115246404-150x150.webp
888image-20251007163806997文章缩略图remark-wordpress发布系统中自定义提示快Admonition插件说明https://haoyelaiga.com/wp-content/uploads/2025/10/image-20251007163806997-150x150.webp
851image-20251002195126616文章缩略图使用自己的网站服务器来接管微信公众号开发的完整教程https://haoyelaiga.com/wp-content/uploads/2025/10/image-20251002195126616-150x150.webp
929house文章缩略图使用wp-mail测试邮件功能https://haoyelaiga.com/wp-content/uploads/2025/10/house-150x150.webp
931image-20250928115827175文章缩略图wordpres图片自动裁剪和缩略图的使用指南https://haoyelaiga.com/wp-content/uploads/2025/10/image-20250928115827175-150x150.webp
942image-20250927223342943文章缩略图WP‑CLI命令行来重构WordPress的缩略图https://haoyelaiga.com/wp-content/uploads/2025/10/image-20250927223342943-150x150.webp

总计图片数量: 8

WordPress Post 文章常用函数参考表:

函数名称用途语法示例返回值
the_title()显示文章标题the_title(); // 直接输出
echo get_the_title(); // 获取标题
无返回值(直接输出) / 字符串
the_content()显示文章内容the_content(); // 显示完整内容
the_content("继续阅读..."); // 自定义more标签
无返回值(直接输出)
the_excerpt()显示文章摘要the_excerpt(); // 显示摘要
echo get_the_excerpt(); // 获取摘要
无返回值 / 字符串
the_permalink()显示文章永久链接the_permalink(); // 直接输出链接
echo get_permalink(); // 获取链接
无返回值 / URL字符串
the_date()显示文章发布日期the_date(); // 默认格式
the_date("Y-m-d H:i:s"); // 自定义格式
无返回值(直接输出)
get_the_date()获取文章发布日期echo get_the_date(); // 默认格式
echo get_the_date("Y年m月d日");
日期字符串
the_author()显示文章作者the_author(); // 显示作者名
echo get_the_author(); // 获取作者名
无返回值 / 作者名字符串
has_post_thumbnail()检查是否有特色图片if(has_post_thumbnail()) { ... }
has_post_thumbnail($post_id)
true/false
the_post_thumbnail()显示特色图片the_post_thumbnail(); // 默认尺寸
the_post_thumbnail("thumbnail");
无返回值(直接输出HTML)
get_post_meta()获取文章自定义字段get_post_meta($post_id, "key", true);
get_post_meta(123, "_price", true);
字段值 / 数组
get_the_category()获取文章分类$cats = get_the_category();
foreach($cats as $cat) { echo $cat->name; }
分类对象数组
get_the_tags()获取文章标签$tags = get_the_tags();
if($tags) { foreach($tags as $tag) { ... } }
标签对象数组 / false
get_post()获取文章对象$post = get_post(123);
echo $post->post_title;
WP_Post对象 / null
wp_get_post_terms()获取文章分类法项目wp_get_post_terms($post_id, "category");
wp_get_post_terms(123, "product_cat");
项目对象数组
get_post_status()获取文章状态echo get_post_status(); // publish
get_post_status($post_id);
状态字符串

提示: 带有"the_"前缀的函数通常直接输出内容,带有"get_"前缀的函数返回值需要用echo输出。

ID 7014 图片详细信息:

ID为7014的图片不存在或不是有效的附件。

API 返回错误状态码 402
响应内容:{"error":{"message":"Insufficient Balance","type":"unknown_error","param":null,"code":"invalid_request_error"}}