Home Support General HivePress Default content position

Default content position

  • Author
    Posts
  • levati

    Wordpress content section displayed below attributes by default.
    If you want to move the content up you must:

    • Open class-listing-view-page.php in hivepress/include/templates/
    • Change listing_description order from 50 to 40
    • Change listing_attributes_secondary order from 40 to 50
    • Save the file and reload it on your server
    • Repeat all of this steps after each plugin’s update 🙁

    One checkbox with label “Move description behind attributes” in Settings tab can solve this problem.

    P.S. Thank you for your pretty code, Ihor.

    ihor developer

    Please try adding this code snippet to the child theme functions.php file, you don’t have to edit the plugin files:

    add_filter(
    	'hivepress/v1/templates/listing_view_page',
    	function( $template ) {
    		return HivePress\Helpers\merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_description' => [
    						'order' => 35,
    					],
    				],
    			],
    			'blocks'
    		);
    	}
    );

    I try to keep it simple for now because there would be hundreds of checkboxes for all layout combinations, as soon as Gutenberg editor introduces the templates feature I’ll integrate it with HivePress.

    levati

    Nice solution. Thank you 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.