Home Forums Backend Issues (wp-admin) Problem with Footnotes plugin and ACF Pro


Problem with Footnotes plugin and ACF Pro

  • hi.

    There were several threads but it hasn’t been solved for me.
    I’m using this plugin:

    I have several ACF fields in my post, where i put footnotes. I put this function into my child theme functions.php file:

    function acf_apply_content_filter_for_api($value, $post_id, $field){
         return str_replace( ']]>', ']]>', apply_filters( 'the_content', $value) );
    function add_content_filter_ACF(){
          add_filter('acf/format_value/type=wysiwyg', 'acf_apply_content_filter_for_api', 10, 3);
    add_action('init', 'add_content_filter_ACF');

    It starts to work(let’s say) but the problem is the footnotes summary appears after every WYSIWYG field, and also it doesnt work fully properly.. I want it to only appear after all the contents of the post and summarize footnotes from all fields.

    somebody proposed a solution but i dont understand it and it doesnt work for me:

    edit: if it’s unclear ill rephrase what im looking for:
    Is there a way to select all the output of ACF and apply a filter to it, treating it as a single field? or just select all the content of a wordpress post?

    I’m an amateur when it comes to core understanding of WP and PHP and it’s my second day of using ACF 😉

    thank you!

  • I fixed it. Fixes same problem with Table of content.

    I just add the fields i want to be parsed by the plugins to wordpress’ the_content() in my template.

    function prepend_this($content)
        $content = get_field("some_field");
        return $content;
    <?php the_content(); ?>

    my site uses only ACF fields for content, so the_content() is always empty. Your results may vary.

    If something’s not clear, ask away.

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

You must be logged in to reply to this topic.