Skip to content

Commit

Permalink
Workshops: Enable excerpts
Browse files Browse the repository at this point in the history
Add excerpt to the post type and grab the latest workshop for now, instead of a featured one.
  • Loading branch information
coreymckrill committed Aug 10, 2020
2 parents 21b79e8 + 0331739 commit 2ca3841
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wp-content/plugins/wporg-learn/inc/post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function register_workshop() {
'label' => __( 'Workshop', 'wporg_learn' ),
'description' => __( 'WordPress.org Training Workshop', 'wporg_learn' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'comments', 'revisions', 'custom-fields', 'thumbnail' ),
'supports' => array( 'title', 'editor', 'comments', 'revisions', 'custom-fields', 'thumbnail', 'excerpt' ),
'taxonomies' => array( 'level', 'topic' ),
'hierarchical' => true,
'public' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @package WPBBP
*/

$args = array( 'category_name' => 'Featured', 'posts_per_page' => '1' );
$args = array( 'posts_per_page' => '1' );

$featured_workshop = wporg_get_workshops( $args );
?>
Expand All @@ -23,12 +23,12 @@
<a class="featured-workshop_title" href="<?php echo esc_url( get_the_permalink() ); ?>"><?php echo the_title() ?></a>
<div class="row">
<div class="col-8">
<p>With WordPress moving more and more into the world of blocks, knowing how to build your own blocks has become valuable knowledge. However, if you are a plugin or theme developer, you might not be sure where to start. This workshop will serve as a guide to building your first block.</p>
<p><?php the_excerpt(); ?></p>
</div>
<div class="col-4 featured-workshop_content_author">
<?php get_template_part( 'template-parts/component', 'author' ); ?>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>

0 comments on commit 2ca3841

Please sign in to comment.