Skip to content

Commit

Permalink
Optional annoucement content
Browse files Browse the repository at this point in the history
Make both buttons and thumbnails optional in homepage annoucements.
  • Loading branch information
ajparsons committed Jun 2, 2023
1 parent 5eeff88 commit f3aad3e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
<?php if ( $featured_item ) { ?>
<h2>The latest</h2>
<div class="featured-content__wrapper">
<a href="<?= $featured_item->url ?>"><img class="featured-content__image" src="<?= $featured_item->thumbnail_image_url ?>" alt="<?= $featured_item->thumbnail_image_alt_text ?>"></a>
<?php if (isset($featured_item->thumbnail_image_url)) { ?>
<a href="<?= $featured_item->url ?>"><img class="featured-content__image" src="<?= $featured_item->thumbnail_image_url ?>" alt="<?= $featured_item->thumbnail_image_alt_text ?>"></a>
<?php } ?>
<div>
<a href="<?= $featured_item->url ?>"><h3 class="featured-content__title"><?= $featured_item->title ?></h3></a>
<p class="featured-content__description"><?= $featured_item->content ?></p>
<a class="button featured-content__button" href="<?= $featured_item->url ?>"><?= (isset($featured_item->button_text) ? $featured_item->button_text : "Read more") ?></a>
<?php if (isset($featured_item->button_text)) { ?>
<a class="button featured-content__button" href="<?= $featured_item->url ?>"><?= (isset($featured_item->button_text) ? $featured_item->button_text : "Read more") ?></a>
<?php } ?>
</div>
</div>

Expand Down

0 comments on commit f3aad3e

Please sign in to comment.