Support » Plugin: Advanced Custom Fields: Button Field » Custom post url wrong, here’s a fix

  • A custom url will always be a post url because the conditional is validating against a none existing variable.

    To fix it, in file acf-button-v5.php change line 828 and next lines to:

    
    if ( 'custom' === $field['default_type'] ) {
    	$url = $value['url'];
    } else {
    	$url  = get_permalink( $field['value']['post'] );
    }
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom post url wrong, here’s a fix’ is closed to new replies.