After looking at the 'WordPress beginner' thread and the WP syntax, I thought it might interesting to post what it would take in other CMS's to roughly replicate the same functionality from various examples.
To start, using the example from the mentioned thread:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( in_category( '4' ) ) : ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
Inhertited a large amount of content in a CMS. All inline content images are contained within the HTML5 <figure> tag. Some also have captions <figcaption>, some don’t.
I want to differentiate the styling of the figure tag whether it has a figcaption or not.
So there is: