Support

Account

Home Forums General Issues Help Link Field

Helping

Help Link Field

  • Hello, I’m trying to make a database of books. To include the data I have created several custom text fields, Now I want the “Author” field to be a link to the page of each author.
    I tried changing the text field to link, but it gives me error in the “functions.php”. I’m using a child theme.
    This is the code that I am using:

    function dcms_caracteristicas_producto () {

    if (function_exists (‘get_field’)) {

    echo ” Author: </ strong>”. get_field (‘author’). “</ p>”;
    echo ”
    Pseudonym: </ strong>”. get_field (‘pseudonym’). “</ p>”;
    echo ”
    Cover: </ strong>”. get_field (‘cover’). “</ p>”;
    echo ”
    Collection: </ strong>”. get_field (‘collection’). “</ p>”;
    echo ”
    Number: </ strong>”. get_field (‘number’). “</ p>”;
    echo ”
    Editorial: </ strong>”. get_field (‘editorial’). “</ p>”;
    echo ”
    Year: </ strong>”. get_field (‘ano’). “</ p>”;
    echo ”
    Edit: </ strong>”. get_field (‘edit’). “</ p>”;
    echo ”
    Series: </ strong>”. get_field (‘string’). “</ p>”;
    }

    }

    Can you help me? Thank you

  • What do you have the link field set to return? You may not be able to simply echo the field value. https://www.advancedcustomfields.com/resources/link/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.