the_post(); $my_array_post_id = get_the_ID(); $sql = "SELECT * FROM `{$table_name}` WHERE `user_id` = '{$user_id}' "; $sql .= "AND `post_id` = '{$my_array_post_id}'"; $progress = $wpdb->get_row($sql); $lessons_count = $progress->lessons_count; if ($progress->checked_lessons != 0) { $checked_lessons = explode(',', $progress->checked_lessons); $checked_lessons_count = count($checked_lessons); } else { $checked_lessons_count = 0; } //проверка если курс пройден не полностью, то показывать его на странице // "Мои массивы", в противном случае, курс будет показан на странице "Моя зачётка" if ($lessons_count != $checked_lessons_count) { echo "<li><a href='" . get_permalink() . get_first_unchecked_lesson(get_the_ID()) . "' title='" . get_the_title() . "'>" . get_the_title() . "</a> "; wpfp_remove_favorite_link(get_the_ID()); diductio_add_progress(get_the_ID()); echo "</li>"; $curses_count++; } } if ($curses_count == 0) { echo "<li>Мои массивы пусты</li>"; } echo "</ul>"; echo '<div class="navigation">'; if (function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
?> " <?php post_class(); ?> > <?php // Post thumbnail. twentyfifteen_post_thumbnail(); ?> <header class="entry-header"> <?php if (is_single()) { the_title('<h1 class="entry-title">', '</h1>'); } else { the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink()) . get_first_unchecked_lesson($post->ID)), '</a></h2>'); } ?> </header><!-- .entry-header --> <div class="entry-content <?php echo $removing_space_class; ?> "> <?php /* translators: %s: Name of current post */ the_content(sprintf(__('Continue reading %s', 'diductio'), the_title('<span class="screen-reader-text">', '</span>', false))); wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'diductio') . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '<span class="screen-reader-text">' . __('Page', 'diductio') . ' </span>%', 'separator' => '<span class="screen-reader-text">, </span>')); ?>