• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Hide Scripts ( Page-specific Scripts ) and Page attribute

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Hide Scripts ( Page-specific Scripts ) and Page attribute

This topic is: resolved

Tagged: genesis_inpost_scripts_box, remove_meta_box

  • This topic has 8 replies, 2 voices, and was last updated 9 years, 4 months ago by horace1.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • February 23, 2017 at 7:42 am #201815
    horace1
    Member

    Hi is there a way to hide Scripts (Page-specific Scripts) and Page attribute

    From clients?

    February 23, 2017 at 12:50 pm #201837
    Brad Dalton
    Participant

    Which code language are you referring to? Like jQuery and PHP scripts?

    You can disable the theme and plugin editors in wp_config.php using the following code:

    define( 'DISALLOW_FILE_EDIT', true );

    Tutorials for StudioPress Themes.

    February 23, 2017 at 1:41 pm #201843
    horace1
    Member

    No,I mean when like a client is logged into wordpress and they go to edit a page they see scripts at the bottom and page attribute to the right.

    February 23, 2017 at 1:42 pm #201844
    horace1
    Member

    I'm wanting to remove or hide it from clients.

    February 23, 2017 at 1:48 pm #201845
    Brad Dalton
    Participant

    You should be able to remove those 2 meta boxes. You could hide them using CSS or use PHP code to remove them.


    Tutorials for StudioPress Themes.

    February 23, 2017 at 2:23 pm #201849
    Brad Dalton
    Participant

    You can use the Screen Options to remove those meta boxes.

    Or use a plugin like this to customize them


    Tutorials for StudioPress Themes.

    February 24, 2017 at 2:06 pm #201918
    horace1
    Member

    I found the code:

    Remove the Page attribute meta data
    =====================

    function remove_page_fields() {
    remove_meta_box( 'pageparentdiv' , 'page' , 'normal' ); //removes page attributes
    }
    add_action( 'admin_menu' , 'remove_page_fields' );

    Remove Scripts
    =====================

    remove_action( 'admin_menu', 'genesis_add_inpost_scripts_box' );

    February 24, 2017 at 2:37 pm #201920
    Brad Dalton
    Participant

    Good stuff. This removes the scripts box from all Edit Page screens:

    add_action( 'admin_menu' , 'remove_genesis_inpost_scripts_box' );
    function remove_genesis_inpost_scripts_box() {
    remove_meta_box( 'genesis_inpost_scripts_box' , 'page' , 'normal' ); 
    }
    

    Tutorials for StudioPress Themes.

    February 24, 2017 at 4:38 pm #201926
    horace1
    Member

    Thanks, I added this for post

    remove_meta_box( 'genesis_inpost_scripts_box' , 'post' , 'normal' );

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble