php - 在 avada 主题融合 wordpress 中显示没有图像的投资组合列表
问题描述
如何在 Avada 主题上显示没有缩略图的投资组合列表(仅标题)?
解决方案
假设您的投资组合项目是作为自定义帖子类型创建的,您可以创建自定义 wordpress 查询来获取它们。
$args = array(
'post_type' => 'your_custom_post_type_slug',
'post_status' => 'publish'
);
$portfolio_items = new WP_Query( $args );
if( $portfolio_items->have_posts() ){
while( $portfolio_items->have_posts() ){
$portfolio_items->the_post();
the_title();
}
}
或者,您可以使用 CSS 隐藏所有图像display: none;
。
推荐阅读
- swift - 关闭插页式广告后显示新的视图控制器
- ios - 按日期/Firestore 对对象进行排序
- graphql - GraphQL 响应数组在返回之前突然变空(??)
- c++ - 如何从 strtok() 访问令牌?
- flutter - Flutter:构建和添加小部件时列溢出
- sql - PostgreSQL , SQL: 具有两种场景的启动脚本
- verilog - 2 对 1 多路复用器,带 1 个单端口 ram
- amazon-web-services - 领域图集和 aws s3 的最佳实践认证概念
- xml - XML DOM——读取同一时间的两个节点
- biztalk - BizTalk 一种方式发送端口自定义行为 AfterReceiveReply 未触发