Join our new community forum for support & discussion

Join Now

Home Support Themes JobHive Listing image

Listing image

  • Author
    Posts
  • bartosz

    Hi, is it possible, to have image of product at listings instead of vendor’s image? Like in free listinghive theme.

    ihor developer

    As a temporary fix, please try removing /wp-content/themes/jobhive/hivepress/listing/view/block/listing-image.php file from the theme folder, this should display the listing images instead. This is the easiest way, the other option is creating a child theme and placing this file https://github.com/hivepress/hivepress/blob/master/templates/listing/view/block/listing-image.php in /hivepress/listing/view/block folder within the child theme folder (then it’ll override this file in JobHive).

    AlexWeb

    There is no such file with this name, so there is no path. I bought a theme, too, this question is interested in how to do it? Please help
    https://ibb.co/85GCZ58

    ihor developer

    Please try using this code snippet, you can add it via the Code Snippets plugin or to the child theme’s functions.php file:

    add_filter(
    	'hivepress/v1/templates/listing_view_block/blocks',
    	function( $blocks, $template ) {
    		return hivepress()->helper->merge_trees(
    			[ 'blocks' => $blocks ],
    			[
    				'blocks' => [
    					'listing_image' => [
    						'path' => 'listing/view/block/listing-image',
    					],
    				],
    			]
    		)['blocks'];
    	},
    	1000,
    	2
    );
    movedbymark

    I tested out the snippet above for ListingHive and it doesn’t appear to work. Is there a solution for ListingHive also?

    I’d like the listing image to be presented in place of the vendor image. No need to have my users upload two different pictures.

    Many thanks!!! 🙏

    ihor developer

    Sorry, this would require other customizations because the code above works vice versa (replaces the vendor image with the listing one for listings, because in JobHive listings display the vendor images). Changing vendor images to the listing image (the first one? because vendors can have a few listings) would require custom implementation.

Viewing 6 posts - 1 through 6 (of 6 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.