Support » Plugin: acf-autosize » Possibility to Make it Work Also on Front End (Using ACF Frontend)

  • Resolved blackeye0013

    (@blackeye0013)


    Hello,

    Your plugin is really handy, is there a way I can make it work also on the frontend (for which I’m using ACF Frontend)?

    On the backend, everything is OK, but on the frontend it simply doesn’t work.

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Yeah GbR

    (@yeah8000)

    Hi,

    I don’t really have your setup, so I can’t test it. All the scripts currently only get enqueued in the backend, so it can’t work in the frontend.

    But you could try to enqueue the scripts in the frontend, by adding

    add_action('wp_footer', array($this, "enqueue"));

    after line 21 in acf-autosize.php.
    This should give you the same functionality in the frontend. If the markup and behaviour of the fields is the same as in the backend it could work…

    Thread Starter blackeye0013

    (@blackeye0013)

    Excellent, works like charm! Thanks for the quick answer.
    Is there a way, how can I use it without editing the plugin code directly? Maybe by adding a filter / plugin option?

    Thanks again.

    Plugin Author Yeah GbR

    (@yeah8000)

    I just released a new version, that has a filter to enable autosize in the frontend. Update and try this in your functions.php:

    add_filter('acf-autosize/enabledInFrontend', function () {
     	return true;
    });
    Thread Starter blackeye0013

    (@blackeye0013)

    Excellent, works as intended! Thanks for your work, you’ve just earned my 5-star review. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Possibility to Make it Work Also on Front End (Using ACF Frontend)’ is closed to new replies.