Join our new community forum for support & discussion

Join Now

Home Support General HivePress Listing creation or latest update date in the secondary blocks

Listing creation or latest update date in the secondary blocks

  • Author
    Posts
  • alexif

    Hello!

    I would like to use a code or snipped that can help me provide the date of when the listing was added. It helps the overview/filtering in page.

    Thanks,
    Alex

    ihor developer

    Sorry, there’s no such feature yet but there’s a data of publication (it’s updated if the listing is renewed). If it’s hidden please make sure that there’s no CSS that may hide it (it’s hidden in some of our themes by default though).

    Kim

    How to add a publication date to a theme experthive?

    Kim

    for listing

    ihor developer

    It’s possible, but requires a custom code snippet:

    add_filter(
    	'hivepress/v1/templates/listing_view_page',
    	function( $template ) {
    		return hivepress()->helper->merge_trees(
    			$template,
    			[
    				'blocks' => [
    					'listing_created_date' => [
    						'type' => 'part',
    					],
    				],
    			]
    		);
    	},
    	1000
    );
    Kim

    great! thx

    Kim

    this works on the ad page, but does not work in the block.

    yevhen developer

    Please try to add the similar code snippet but please change hivepress/v1/templates/listing_view_page on hivepress/v1/templates/listing_view_block

    Kim

    not work. I think it’s enough that there is
    dont worry

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