I am using custom template in wordpress. This is the code

    <a href="<?php echo get_category_link($cat->term_id); ?>">
        <img class="home-img" src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" />
        <p><?php echo $cat->cat_name; ?></p>
<?php endforeach; ?>

which is displaying category with category images like this Screenshot1.
I want to display the text on the image not below the image.

Read more here: how to make text over the image using css while dynamically displaying the image and the text from backend using custom template in wordpress?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: