Support » Plugin: Auto Affiliate Links » Compatibility with ACF

  • Resolved dtszero

    (@dtszero)


    Hi!

    Recently I added the Advanced Custom Fields plugin and I add the fields on my single.php template of my theme, but the Auto Affiliate Links plugin don’t take the fields.

    So, isn’t working.

    How can I make it compatible?

    Regards,

    The page I need help with: [log in to see the link]

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

    (@thedark)

    Hello. We had issues before with this type of plugins. This is happening because we rely on “the_content” function call to add the links inside the text. If the plugin use another function then we have to add the filter to that function too. We will look into this and will try to find a solution.

    Thanks for the reply! I’ll wait for that.

    Regards,

    Hi @thedark!

    Today I look into my code for add the ACF and I apply a filter directly on the content, so can I send the “new content” to the Auto Affiliate plugin?

    This is the code that I used

    add_filter( 'the_content', 'wpse241388_use_acf_field' );
    function wpse241388_use_acf_field( $content ) {
        if ( is_singular( 'article' ) ) {
            $content = get_field( 'article_text' );
        }
        return $content;
    }

    https://wordpress.stackexchange.com/questions/241388/replace-posts-the-content-with-acf-value

    Plugin Author Lucian Apostol

    (@thedark)

    Hello. I have added support for advanced custom fields. Update Auto Affiliate Links to the latest version ( 5.5.1 ), then go to Auto Affiliate Links -> General Settings. Next to “Add link on”, the last checkbox is for Advanced Custom Fields. Activate it and see if it is working. Let me know if you encounter any problems.

    It’s works fine!

    Thanks for the support.

    Plugin Author Lucian Apostol

    (@thedark)

    Please let me know if this update is causing problems.

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