This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Lessons | |
* | |
* @package ecokids_theme | |
*/ | |
get_header(); ?> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="single-lesson"> | |
<h5><?php the_title(); ?></h5> | |
<p class="lesson-grade"><?php $terms = get_the_terms( $post->ID, 'subject' ); | |
foreach ( $terms as $term ) { echo '<span class="each-tag">'; echo $term->name; echo '</span>'; }?></p> | |
<p class="lesson-grade"><?php $terms = get_the_terms( $post->ID, 'grade' ); | |
foreach ( $terms as $term ) { echo '<span class="each-tag">'; echo $term->name; echo '</span>'; }?></p> | |
<p class="lesson-theme"><?php $terms = get_the_terms( $post->ID, 'theme' ); | |
foreach ( $terms as $term ) { echo '<span class="each-tag">'; echo $term->name; echo '</span>'; }?></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php while ( have_posts() ) : the_post(); ?> | |
<div><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div> | |
<?php endwhile; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'post_type' => 'any', | |
'posts_per_page' => 15, | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="single-lesson"> | |
<h5><?php the_title(); ?></h5> | |
<p class="lesson-grade"><?php $terms = get_the_terms( $post->ID, 'subject' ); | |
if ( $terms ) { foreach ( $terms as $term ) { echo '<span class="each-tag">'; echo $term->name; echo '</span>'; } } ?></p> | |
<p class="lesson-grade"><?php $terms = get_the_terms( $post->ID, 'grade' ); | |
if ( $terms ) { foreach ( $terms as $term ) { echo '<span class="each-tag">'; echo $term->name; echo '</span>'; } } ?></p> | |
<p class="lesson-theme"><?php $terms = get_the_terms( $post->ID, 'theme' ); | |
if ( $terms ) { foreach ( $terms as $term ) { echo '<span class="each-tag">'; echo $term->name; echo '</span>'; } } ?></p> |