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

    Hi,

    I only want authors to use the Classic Editor (installed plugin) for normal blog posts. Which is why I would like to hide the ALB editor for editors and authors, but just for normal blog posts. The button should remain available for Pages and Portfolios.

    I thought I had found a solution with the code below, but that hides the button everywhere.

    // Hide Advanced Layout Builder button
    // >>>>> HOW TO RESTRICT THIS TO JUST THE NORMAL WP POSTS?
    add_action('admin_head', ' hide_alb_editor_button');
    function hide_alb_editor_button() {
      echo '<style>
        #poststuff #avia-builder-button {
          display: none;
        }
      </style>';
    }

    So, is it possible to restrict the hiding of the button to just the blog posts?

    Thanks for your help and have a good day,
    Rob

    #1330795

    Hey Rob,

    Please try this CSS instead:

    body.post-type-post #wpwrap .avia-builder-button {
          display: none;
    }

    Best regards,
    Rikard

    #1330804

    Hi Rikard,

    Thanks a lot, that works perfectly, just like I wanted. Solved.

    Have a good day,
    Rob

    #1330811

    Hi,

    Great, I’m glad that you got it working. I’ll go ahead and close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide Advanced Layout Builder button for blog posts only’ is closed to new replies.