Create an image placeholder for a category using the slug of the category linked to the FTP Directory

Description

PHP Source Code

                        
                          <!--Get flag icon by slug start-->	
<?php

foreach((get_the_category()) as $childcat) {
if (cat_is_ancestor_of(267, $childcat)) {
echo '<img src="https://seekafricanow.com/wp-content/themes/fioxenvercel/img/flags/' . $childcat->slug . '.png" alt="' . $childcat->name . '" title="' . $childcat->name . '" />';
}} 
?>
<!--Get flag icon by slug End-->                        
                        


Post Categories