Open listing details in new tab when click on bubble description

This topic contains 4 replies, has 3 voices, and was last updated by  Kiran 5 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #517503

    Frank Zwecker
    Buyer
    Post count: 10

    How can it be done that the details page of a location opens in a new tab when clicking on a bubble? Some members already asked for a this some years ago, e.g. “adyp” on June 13, 2017 at 10:01 am with post #382959.

    You advised inserting a custom PHP code into the code snippets plugin. But it seems to me that this solution doesn´t work any more with Geodirectory V2.

    Is there a current solution?

    Thanks a lot in advance.

    #517552

    Alex Rollin
    Moderator
    Post count: 27815
    #517591

    Kiran
    Moderator
    Post count: 7069

    Hi Frank,

    For GDv2 use following PHP snippet to open post link in a new window from map popup.

    
    
    /**
     * Open post link in a new window from map popup.
     */
    function gd_snippet_191118_wp_super_duper_widget_output( $output, $instance, $args, $super_duper ) {
    	if ( $output != '' && ! empty( $super_duper ) && ! empty( $super_duper->options['base_id'] ) && in_array( $super_duper->options['base_id'], array( 'gd_post_title', 'gd_post_images' ) ) ) {
    		$output = str_replace( array( ' href="', " href='" ), array( ' target="_blank" href="', " target='_blank' href='" ), $output );
    	}
    	return $output;
    }
    add_filter( 'wp_super_duper_widget_output', 'gd_snippet_191118_wp_super_duper_widget_output', 20, 4 );

    Regards,
    Kiran

    #517595

    Frank Zwecker
    Buyer
    Post count: 10

    Hi Kiran,

    works 🙂

    Thanks a lot,
    Frank

    #517597

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount