I want to use font awesome instead of post thumbnail for some bootstrap cards that are part of my custom wordpress theme. Is this possible or I need to fallback on the post excerpt to obtain the desired result? Another question is about the content, I want to make a single page website so I'm using REST API to get the various custom post type contents, is this choice better than the standard page loading with a custom post type dedicated template? Thanks for the help.
Here is my code:
<?php $services = new WP_Query( ['post_type' => 'services'] ); ?>
<?php if( $services->have_posts() ): while( $services->have_posts() ): $services->the_post(); ?>
<div class="col-sm-12 col-md-3 col-lg-3">
<div class="card">
<!-- Instead of the img tag, here I need to load a different font awesome icon for each post-->
<img class="card-img-top" src="<?php the_post_thumbnail_url(); ?>">
<hr>
<a class="btn btn-outline-light" href="#"><?php the_title('<h4>','</h4>'); ?></a>
</div>
</div>
<?php endwhile; ?>
<?php endif; wp_reset_postdata(); ?>
<i>
tag. What I want to do is to filter the post thumbnail function to display the font awesome markup based on the post content, nor upload an image.