Closed jeffreybarry closed 1 year ago
Setup Bootstrap grid with 3 cards (images and text below image). Content is pulled from a set of posts.
Loop through categories for "Feature" and display last three.
NOTE: the number of features displayed should be 3. The code defaults to the number specified in Settings>blog pages show.
The number is not set in the code. Perhaps it should be in the future to prevent too many features from displaying.
Extra number of features will simply fill the grid, thereby making each feature smaller in width.
How will images be handled? Set as featured image for that post? Will they size appropriate to the grid, which is fluid?
<section class="container-fluid TOC-features">
<div class="card-group">
<?php
$args = array(
'category_name' => 'feature',
);
$category_posts = new WP_Query($args);
if ($category_posts->have_posts()) :
while($category_posts->have_posts()) :
$category_posts->the_post();
?>
<div class="card">
<!-- <img class="card-img-top" src="..." alt="Card image cap"> -->
<?php the_post_thumbnail( 'full', array( 'class'=>'card-img img-fluid' ) ); ?>
<div class="card-body">
<p class="card-text"><?php the_content() ?></p>
</div>
</div>
<?php
endwhile;
else:
?>
Oops, there are no features.
<?php
endif;
wp_reset_postdata();
?>
</section>
Refer to Paris Review...
image Prominent text gutter between
Needs to be a 4th menu item.
Mita Janet McAdams interview [the third feature is something...a link to the article on the columns]
Are there going to be featured content for this upcoming issue?
Not too difficult to program in squares at bottom of page.
3 boxes. grid image (gerald the re-enactor) with an evocative text
Should box border be colored the same as the featured image for the issue? Or default to gray/black?
Go with grid of 3 bootstrap images with text underneath