我不知道自己在做什么错,但似乎无法在自己的网站上显示我的数据。
我希望在我根据创建类时显示出来。
what I want to show when I do inspect element
这就是我做我的php的方式-我不知道我是否记错了。
<div class="tile-wrapper">
<!-- TILES PER CATEGORY -->
<?php
$tiles = get_posts( array(
'post_type' => 'artise-tiles',
'artise-tile-category' => $tile_category->slug,
'posts_per_page' => 10,
'offset' => 0,
'orderby' => 'name',
'order' => 'DESC'
) );
?>
<?php foreach( $tiles as $tile ): ?>
<?php
$tile_img = get_post_meta( $tile->ID, 'artise-tile-img', true );
$category_terms = implode( ', ', get_terms( array(
'taxonomy' => 'artise-tile-category',
'object_ids' => $tile->ID,
'fields' => 'names'
) ) );
$itile = array_search( $tile->ID, $curr_tile_ids );
$tileExists = true;
if( $itile === false ){
$itile = $tile_count;
$tileExists = false;
$curr_tile_ids []= $tile->ID;
}
?>
<div