snippet not displaying | WordPress.org

[ad_1]

I’m trying to get the following PHP snippet to display on posts. But nothing is displaying.
Is there something wrong with my code?

<div class="profile-subhead">
<table class="profile-table-subhead">
<tr>
<td class="profile-nowrap"><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></td>
<td class="profile-absorbing-column"><?php the_title(); ?></td>
</tr>
</table>
</div>

It works with Insert PHP Code Snippets plugin but would prefer to use this plugin.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer