Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add excerpt to the post type and grab the latest workshop for now, instead of a featured one. #33

Merged
merged 2 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,7 +23,7 @@
<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 echo get_the_excerpt(); ?></p>
coreymckrill marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div class="col-4 featured-workshop_content_author">
<?php get_template_part( 'template-parts/component', 'author' ); ?>
Expand Down