我正在使用带有 Learnpress 插件的 wordpress。我想破解列表课程循环以显示每一行的课程详细信息。
在循环section.php
<?php
foreach ( $items as $item ) :
$can_view_item = $user->can_view_item( $item->get_id(), $can_view_content_course );
?>
<li class="<?php echo esc_attr( implode( ' ', $item->get_class() ) ); ?>" data-id="<?php echo esc_attr( $item->get_id() ); ?>">
<?php
do_action( 'learn-press/before-section-loop-item', $item, $section, $course );
$item_link = $can_view_item->flag ? $item->get_permalink() : false;
$item_link = apply_filters( 'learn-press/section-item-permalink', $item_link, $item, $section, $course );
?>
<a class="section-item-link" href="<?php echo $item_link ? esc_url( $item_link ) : 'javascript:void(0);'; ?>">
<?php
do_action( 'learn-press/before-section-loop-item-title', $item, $section, $course );
learn_press_get_template(
'single-course/section/' . $item->get_template(),
array(
'item' => $item,
'section' => $section,
)
);
do_action( 'learn-press/after-section-loop-item-title', $item, $section, $course );
?>
</a>
<?php do_action( 'learn-press/after-section-loop-item', $item, $section, $course ); ?>
</li><li class="subtab"> The_content_Description
</li>
<?php endforeach; ?>
如何将 The_content_Description 替换为每节课的内容?如果您有一个想法,这将对您有所帮助:)谢谢