Join our new community forum for support & discussion

Join Now

Home Support Themes ExpertHive Displaying categories name on the Add Details page

Displaying categories name on the Add Details page

  • Author
    Posts
  • Terry_tip

    Hello everybody! We have a new question about the experthive theme. Is there a way to show the name of the category that we’re trying to announce? I mean in the Add Details page where we upload the images and all the data to list a service.

    It could be something like: Add Details of “Name of the Category here” ?

    Thanks for the your support.

    yevhen developer

    Please try this PHP snippet

    add_filter(
    	'hivepress/v1/templates/listing_submit_details_page/blocks',
    	function($blocks, $template){
    		$listing = $template->get_context('listing');
    
    		if($listing){
    			$template->set_context('page_title', 'Add Details of '.esc_html($listing->get_categories__name()[0]));	
    		}
    		return $blocks;
    	},
    	1000,
    	2
    );
    Terry_tip

    Nice, it works perfectly! Thanks A LOT!

    One more question, before the Add Details page we can select the category of the service. It is posible to add a little description in that page below the “Select Category” text.

    For example:
    Select Category
    Select a category for the type of your service, bla bla bla.

    yevhen developer

    Please try this PHP snippet

    add_filter(
    	'hivepress/v1/templates/listing_submit_category_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'page_content' => [
    						'blocks' => [
    							'custom_category_text' => [
    								'type' => 'content',
    								'content' => 'Your text here',
    								'_order' => 9,
    							]
    						],
    					],
    				],
    			]
    		);
    	},
    	1000
    );
    Terry_tip

    Perfect, it work exactly as we want to. Is there a way to move up the text one line?
    Arround this area for example:

    https://imagizer.imageshack.com/img923/7279/t5N0nE.png

    Thanks!

    yevhen developer

    You can try this CSS snippet to start but it can require further customisation

    .hp-template--listing-submit-category-page .hp-page__title{
    	margin-bottom: 0;
    }
    Terry_tip

    Yes, it works but now the category blocks are too close to the text 🙁

    Need to lower a bit and the page would be ready, at least at the level of the arrow:

    https://imagizer.imageshack.com/img923/8216/04y6US.png

    Thanks Yevhen!

    yevhen developer

    Please try this CSS snippet to start but it can require further customisation

    .hp-template--listing-submit-category-page .hp-listing-categories{
    	margin-top: 10px;
    }
Viewing 8 posts - 1 through 8 (of 8 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.