Skip to content

Instantly share code, notes, and snippets.

@hivepress
Last active August 21, 2025 13:16
Show Gist options
  • Select an option

  • Save hivepress/92f55ad72c4770e13ecb7b9942d16b04 to your computer and use it in GitHub Desktop.

Select an option

Save hivepress/92f55ad72c4770e13ecb7b9942d16b04 to your computer and use it in GitHub Desktop.

Revisions

  1. hivepress revised this gist Aug 21, 2025. No changes.
  2. hivepress created this gist Aug 21, 2025.
    15 changes: 15 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    <?php
    add_filter(
    'hivepress/v1/templates/listing_view_page/blocks',
    function ( $blocks, $template ) {
    $listing = $template->get_context( 'listing' );

    if ( $listing && ! $listing->is_verified() ) {
    hivepress()->template->fetch_block( $blocks, 'listing_buy_form' );
    }

    return $blocks;
    },
    1000,
    2
    );