For a short presentation : I’m new here and I’m overall new in the development world (currently in coop work and learning WordPress development).
I have an issue with a business website using ACF PRO : the agency that designed the website seems to have used ACF to create custom fields for backoffice page editing, one of those being a “block” including a thumbnail field, a title field, a content field (text), a button field and a link field sorting every pages or posts existing on the website and linking the button to the selected page/post.
My issue being : when I select a page/post and save the edit, it doesn’t work. In the inspect console it shows that the href is empty and the button thus redirects to the ongoing page.
I’ve tried looking into the theme files and the plugin files and I found the following code in “My_Theme > content-flexible.php” of the theme files. It seems to correspond to the block previously seen when editing the page in the admin backoffice and is indeed using ACF functions “get_sub_field” and “the_sub_field” :
If I replace <a href="<?php the_sub_field('lien'); ?>" with the direct url of the “Contact” page in the href, then the button does indeed redirects to the Contact page. But it’s obviously not what I want, as I don’t benefit from the field at all and it forces me to go in the theme files in order to simply edit the link… (+ all issues going with updates and so on).
All I want is to fix the actions of selecting a page in the link field and actually applying it to the related button. But I’m so lost as to where to do so…
I appreciate any help and I’m available on Discord (or others) to do a screen share if needed.