The #componentz-wrapper is componentz theme main wrapper. There are not any other wrappers above the main wrapper, all other wrappers are inside this wrapper. The componentz main wrapper open tag is inside the header.php file and closing tag inside a footer.php file. You can check the theme HTML structure.
Adding custom jQuery code before the main wrapper 
add_action( 'componentz/theme/before_main_wrapper', 'my_custom_jquery' ); /** * My Custom jQuery */ function my_custom_jquery() { echo '<script type="text/javascript">'; echo 'jQuery(document).ready(function(){ YOUR JQUERY CODE });'; echo '</script>'; }
TIP: You can add any desired content before the main wrapper. Your imagination is only the limit.
Adding custom content on the search page 
add_action( 'componentz/theme/before_main_wrapper', 'myprefix_search_page_before_main_wrapper' ); /** * Show on Search */ function myprefix_search_page_before_main_wrapper() { if ( is_search() ) { echo "it works"; } }
The above code will display it works message on the search.php page before componentz main wrapper.
Wrapping componentz theme main wrapper with your own custom wrapper 
add_action( 'componentz/theme/before_main_wrapper', 'myprefix_before_componentz_main_wrapper' ); add_action( 'componentz/theme/after_main_wrapper', 'myprefix_after_componentz_main_wrapper' ); /** * Myprefix Wrapper Open Tag */ function myprefix_before_componentz_main_wrapper() { echo '<div id="myprefix-wrapper" class="myprefix-wrapper">'; } /** * Myprefix Wrapper Close Tag */ function myprefix_after_componentz_main_wrapper() { echo '</div>'; }
After you add a custom main wrapper, the componentz theme HTML structure will look:
<!DOCTYPE html> <html> <head> <title>Page title</title> </head> <body> <!-- Your Custom Main Wrapper --> <div id="myprefix-wrapper" class="myprefix-wrapper"> <div id="componentz-wrapper"> <header id="componentz-header"> </header> <main id="content" class="site-content" role="main"> </main> <footer id="componentz-footer"> </footer> </div> </div><!-- Your Custom Main Wrapper End --> </body> </html>
TIP: The above PHP codes should be placed inside functions.php file if you are using a Child Theme or in the desired file, if you are adding code to a plugin.