• Resolved mike224

    (@mike224)


    I was testing your free plugin and I have come to the conclusion that natively it does not work with ACF or custom fields. Is there any filter or modification to create links within custom fields?

    Greetings

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DAEXT

    (@daext)

    Hello @mike224,

    this is currently possible only by manually retrieving in the theme template file the value of the ACF field and then by using add_autolinks(), a method used internally by Autolinks Manager to apply the links.

    I created a ticket for this. I have to verify how to make this process simple for the user and add if possible add a specific option, or add an utility methods, or at least document the procedure.

    Let me know if you have other questions.

    Thread Starter mike224

    (@mike224)

    Hello, I just came back to this and trying the following code, it does not make the link in the custom field, however in the entry content it does it without problems, I am choosing the type of custom post type that I need, any idea?

    require_once( ABSPATH . 'wp-content/plugins/daext-autolinks-manager/shared/class-daextam-shared.php' );
    $Daextam_Shared = Daextam_Shared::get_instance();
    echo $Daextam_Shared->add_autolinks( 'addres', false, '', false);
    
    Thread Starter mike224

    (@mike224)

    I have also tried it with the following code and in the custom type “post” and it doesn’t work either

    $yourfield = get_field('addres');
    
    require_once( ABSPATH . 'wp-content/plugins/daext-autolinks-manager/shared/class-daextam-shared.php' );
    $Daextam_Shared = Daextam_Shared::get_instance();
    $yourfield_with_autolinks = $Daextam_Shared->add_autolinks( $yourfield, false, '', false);
    
    echo $yourfield_with_autolinks;
    
    Plugin Author DAEXT

    (@daext)

    Hello mike224,
    in the first parameter of add_autolinks() set the text string on which you want to apply the automatic links. (Not the identifier of the ACF field)
    In the third parameter set an empty string if you are outside the loop, or the identifier of the post type if you are outside the loop.

    Plugin Author DAEXT

    (@daext)

    Hello mike224,

    in the first parameter of add_autolinks() set the text string on which you want to apply the automatic links. (Not the identifier of the ACF field)

    In the third parameter set an empty string if you are inside the loop, or the identifier of the post type if you are outside the loop.

    Plugin Author DAEXT

    (@daext)

    There is an error in my previous message and I can’t edit it. The correct sentence is:

    “In the third parameter set an empty string if you are inside the loop, or the identifier of the post type if you are outside the loop.”.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘ACF compatibility’ is closed to new replies.