Join our new community forum for support & discussion

Join Now

Home Support General HivePress Layout of Seach Form

Layout of Seach Form

  • Author
    Posts
  • SIPOC

    Is there a way to have the search form appear in rows above the listing result blocks rather than a long sidebar search form?

    yevhen developer

    Please try this PHP snippet

    add_filter(
    	'hivepress/v1/templates/listings_view_page',
    	function( $template ) {
    		return $template = hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_filter_modal' => [
    						'blocks' => [
    							'listing_filter_form' => [
    								'type' => 'content',
    							]
    						],
    					],
    					
    					'listings_container' => [
    						'blocks' => [
    							'listing_filter_form_custom' => [
    								'type'   => 'form',
    								'form'   => 'listing_filter',
    								'_order' => 5,
    
    								'attributes' => [
    									'class' => [ 'hp-form--narrow' ],
    								],
    							],
    						],
    					],
    				],
    			]
    		);
    	},
    	1000
    );
Viewing 2 posts - 1 through 2 (of 2 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.