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

  • Did you try using a URL field? Or a text field that you can use to enter a URL?

    You could also have a field that selects an existing category or page… and output the HTML as needed.

    There are a couple different ways to do it… you can choose a field that returns an Object that contains a label and URL… or have two separate fields for that Data for more flexibility. And you can add a 3rd field… a checkbox, asking if the link should open in a new Window..

    Lot of choices.

    Let me know if you need further help.

    p.s. Remember you could use code similar to below to build an anchor tag based on multiple fields:

    <a href="<?php echo get_field('url'); ?>" title="<?php echo get_field('url_title'); ?>"<?php echo get_field('url_new_window'); ?>><?php echo get_field('url_anchor_text'); ?></a>

    The ‘url_new_window’ field can output target=”_blank” (with a leading space if set to TRUE (or checked) )