• Resolved mp

    (@michellapatton)


    I have leadership team custom fields of photo, name, title, and link (links to bio page). When I do not provide the url, this message (Warning: Illegal string offset ‘url’ in /var/www/html/wp-content/themes/xxxx/blocks/xxxx.php on line 16) is what appears above the leadership blocks. The goal is that when a url link is not provided the “View Button” will not appear Any suggestions?

    <?php
    
    $name = get_field('name');
    
    $title = get_field('title');
    
    $photo = get_field('photo');
    
    $biolink = get_field('link');
    
    (line16)echo'<a href="'.$biolink['url'].'" class=“leader”>;
    
    if !empty( $photo ) )
    
    echo w_get_attachment_image( $photo[ID'], 'thumbnail', null, array( 'class’ => 'leader--avatar’));
    
    echo ‘<div class="leader--body">';
    
    echo '<div class="leader--titles">';
    
    if !empty( $name ) )
    
    echo '<h4>' . esc_html( $name ) . '</h4>';
    
    if !empty( $title) )
    
    echo ‘<h6 class="alt”>’ . esc_htmi( $title ) . '</h6>';
    
    echo '</div>';
    
    if !empty( $biolink) )
    
    echo ‘<div class="'leader--biolink">VIEW BIO</div>':
    
    echo ‘</div>;
    
    echo ‘</a>’;
Viewing 1 replies (of 1 total)
  • Plugin Support ACF Support

    (@acfsupport)

    Hi @michellapatton

    ACF Support Team here. This forum is generally used by ACF users to help each other out.

    However, we would love to continue investigating and troubleshooting this issue, please can you create a ticket using our ​support form and we can look into it further.

Viewing 1 replies (of 1 total)

The topic ‘Warning: Illegal string offset ‘url’ in’ is closed to new replies.