Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1406333


    I would like the ALB enabled for PAGES (not POSTS) by default when I create a new PAGE.

    In older theme versions this code by @Mike worked fine:

    With ENFOLD 5.5. not: when I create a new page the ALB is not enabled by default.
    My themesettings are set to “Classic Editor” by the way.

    What is the right code snippet please, so that the ALB is enabled FOR PAGES (NOT for POSTS) BY DEFAULT please?

    Thank you.


    Hey BeeCee,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function trigger_alb_on_load_for_page(){
    	window.addEventListener('DOMContentLoaded', function() {
    		if ($('body.wp-admin.post-new-php.post-type-page').length > 0){
    add_action('admin_head-post-new.php', 'trigger_alb_on_load_for_page');

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    In my test a timeout of 300 ms (less than half a second) is required for the ALB button to be available, so if this doesn’t work for you try increasing the “300” to a higher number.
    Also ensure you are not deferring jQuery with a caching plugin or in theme options, such as Enfold Theme Options ▸ Performance ▸ Load jQuery in your footer

    Best regards,


    It works perfect now with your code snippet!
    Thank you very much!!


    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Activate ALB for pages by default’ is closed to new replies.