# learnpress/4.4.5/templates/single-course/section/item-meta.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.5. 40 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.5/code/templates/single-course/section/item-meta.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.5/raw/templates/single-course/section/item-meta.php
- Modified: 2026-08-22T04:23:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.5/code/templates/single-course/section/item-meta.php#L10-L20`.

```php
<?php
/**
 * Template for displaying item section meta in single course.
 *
 * This template can be overridden by copying it to yourtheme/learnpress/single-course/section/item-meta.php.
 *
 * @author   ThimPress
 * @package  Learnpress/Templates
 * @version  4.0.0
 */

defined( 'ABSPATH' ) || exit();

if ( ! isset( $item ) ) {
	return;
}

$course = learn_press_get_course();
if ( ! $course ) {
	return;
}

$user = learn_press_get_current_user();
?>

<div class="course-item-meta">

	<?php do_action( 'learn-press/course-section-item/before-' . $item->get_item_type() . '-meta', $item ); ?>

	<?php if ( $item->is_preview() && $user && ! $user->has_completed_item( $item->get_id(), $course->get_id() ) ) : ?>
		<span class="item-meta course-item-preview"
			  data-preview="<?php esc_attr_e( 'Preview', 'learnpress' ); ?>"></span>

	<?php else : ?>
		<span class="item-meta course-item-status" title="<?php echo esc_attr( $item->get_status_title() ); ?>"></span>
	<?php endif; ?>

	<?php do_action( 'learn-press/course-section-item/after-' . $item->get_item_type() . '-meta', $item ); ?>
</div>

```
