I’ve this code

<div class="col-sm-4 box-home" style="background-image: url('URL-IMAGE');">

        <div id="spazio" style="height:55%;"></div>

            <div class="description" id="descr-one">
            <h2><?php the_field('titolo_il_box'); ?></h2>
            <p><?php the_field('descrizione_il_box'); ?></p>
            </div>
</div>

I want to add a link to the image of background.

If I add in this mode

<a href="URL">
<div class="col-sm-4 box-home" style="background-image: url('URL-IMAGE');">

        <div id="spazio" style="height:55%;"></div>

            <div class="description" id="descr-one">
            <h2><?php the_field('titolo_il_box'); ?></h2>
            <p><?php the_field('descrizione_il_box'); ?></p>
            </div>
</div>
</a>

link all div !!

Read more here: Add image link to style in div


Solution:

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: