Support

Account

Home Forums General Issues Link a field to a page or to a category Reply To: Link a field to a page or to a category

  • Hi Pietro,

    Yes… sorry to have thrown so many suggestions to you in my reply. I was just elaborating that there are plenty of choices.

    I took another look at your site… and see where you have the code.

    A simple approach would be to create a second field for the URL. This could be a text field or a URL field.

    Here is how you could modify the code to include the second field’s value:

    <?php if( get_field('paese', $this->post->ID) ) { ?>
    
    <div class="block-left"><a href="<?php the_field('collegamento', $this->post->ID); ?>"><?php the_field('paese', $this->post->ID); ?></a></div>
    
    <?php } ?>

    I hope that’s helpful and gets you closer to your goal. Let me know!