【发布时间】:2020-04-09 16:31:33
【问题描述】:
需要帮助这些人,因为我试图在最后一行之前添加一个部分,我使用的是 ACF 灵活内容,并且行可以互换,所以即使我更改它,我添加的部分仍然会一直存在在最后一行之前
if( have_rows($content_rows) ):
while ( have_rows($content_rows) ) : the_row();
if( get_row_layout() == 'row_one' ):
echo 'First row';
endif;
if( get_row_layout() == 'row_two' ):
echo 'Second row';
endif;
{need to add a div here and it should show before the last row even if its moved}
if( get_row_layout() == 'row_three' ):
echo 'Third row';
endif;
endwhile;
endif;
【问题讨论】:
标签: php wordpress while-loop advanced-custom-fields