<?php
//Get the ID of a given category
$category_id = get_cat_ID( 'My Life As a Background Slytherin' );
// Get the URL of this category
$category_link = get_category_link( $category_id );
?>
<!-- Print a link to this category -->
<a href="<?php echo esc_url( $category_link ); ?>" title="My Life As a Background Slytherin">
<img class="homepage-image" src="<?= get_template_directory_uri()?>/assets/homepage-images/1-slytherin-600x600px.png" />
</a>
comments on solution:
would benefit from being fully dynamic so that Emily can add new categories herself. Open new issue
solution:
comments on solution: