Title: Theme Integration
Last modified: March 31, 2022

---

# Theme Integration

 *  Resolved [WPExplorer](https://wordpress.org/support/users/wpexplorer/)
 * (@wpexplorer)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/theme-integration-40/)
 * Looking at the class-page.php file I see that the plugin manually adds support
   for themes to add a “wrapper” around the $content. But there isn’t any way to
   hook into this to provide support for your plugin in a theme.
 * Can you please add a before content and after content hook to make it easier 
   for theme developers to support your plugin without having to contact you guys
   to manually add support?
 * Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [HivePress](https://wordpress.org/support/users/hivepress/)
 * (@hivepress)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/theme-integration-40/#post-15517400)
 * Thanks for your feedback, we’ll add a hook or another solution for this. If adding
   a custom CSS class to the existing wrapper is enough please try using this code
   snippet:
 *     ```
       add_filter(
       	'hivepress/v1/blocks/page',
       	function( $args ) {
       		return hivepress()->helper->merge_arrays(
       			$args,
       			[
       				'attributes' => [
       					'class' => [ 'class-one', 'class-two' ],
       				],
       			]
       		);
       	}
       );
       ```
   
 *  Thread Starter [WPExplorer](https://wordpress.org/support/users/wpexplorer/)
 * (@wpexplorer)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/theme-integration-40/#post-15525263)
 * Hi,
 * Thanks for the reply!
 * The problem is that we include hooks in the default template files. This is what
   our page.php template file looks like for example: [https://a.cl.ly/nOuRv2JN](https://a.cl.ly/nOuRv2JN)–
   so while we could insert classes to fix any potential layout issues, we can’t
   add default hooks so if anyone is inserting content to their site via one of 
   their hooks it won’t display on the HivePress pages.
 * If there was a before/after content hooks we could provide full integration on
   the theme side.
 * Plus, it would allow people to insert extra content on their HivePress pages 
   before/after the content if they wanted (such as advertisements for example) 
   so it could be helpful not just for theme developers.
 * Thank you!!
 *  Plugin Author [HivePress](https://wordpress.org/support/users/hivepress/)
 * (@hivepress)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/theme-integration-40/#post-15525366)
 * Thanks for the details, indeed there’s no easy way to insert custom HTML between
   the header/footer and the HivePress page wrapper, we’ll try to resolve this in
   the next update.
 *  Plugin Author [HivePress](https://wordpress.org/support/users/hivepress/)
 * (@hivepress)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/theme-integration-40/#post-15536128)
 * While testing I found out that it’s already possible with existing hooks, by 
   inserting new blocks before and after the page blocks. Please try this snippet
   to add a custom class and custom content before/after the HivePress page content:
 *     ```
       add_filter(
       	'hivepress/v1/blocks/page',
       	function( $args ) {
       		return hivepress()->helper->merge_arrays(
       			$args,
       			[
       				'attributes' => [
       					'class' => [ 'custom-class' ],
       				],
   
       				'blocks'     => [
       					'before' => [
       						'type'    => 'content',
       						'content' => 'custom HTML before',
       						'_order'  => 1,
       					],
   
       					'after'  => [
       						'type'    => 'content',
       						'content' => 'custom HTML after',
       						'_order'  => 1000,
       					],
       				],
       			]
       		);
       	}
       );
       ```
   
 * We’ll also add a new article to the docs with the most common theme integration
   issues.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Theme Integration’ is closed to new replies.

 * ![](https://ps.w.org/hivepress/assets/icon-256x256.png?rev=1955246)
 * [HivePress - Business Directory, Listings & Classified Ads Plugin](https://wordpress.org/plugins/hivepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hivepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hivepress/)
 * [Active Topics](https://wordpress.org/support/plugin/hivepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hivepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hivepress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [HivePress](https://wordpress.org/support/users/hivepress/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/theme-integration-40/#post-15536128)
 * Status: resolved