Join our new community forum for support & discussion

Join Now

Home Support General HivePress Share URL of listing

Share URL of listing

  • Author
  • jecux

    quiero compartir la URL de los anuncios, esta seria la forma correcta o como puedo agregar el código al botón ?’

    ihor developer

    Please try using the code snippets suggested in this topic. There’s no way to add the listing URL to the display format yet, but it’s possible with a code snippet.


    yo utilize este: pero no he podido compartir cada pagina cual fragmento de código debo agregar en la url:

    	function( $fields, $listing ) {
    		foreach ( $fields as $name => $field ) {
    			if ( isset( $field['display_template'] ) && strpos( $field['display_template'], '%listing_url%' ) !== false ) {
    				$fields[ $name ]['display_template'] = str_replace( '%listing_url%', get_permalink( $listing->get_id() ), $field['display_template'] );
    		return $fields;
    ihor developer

    Please try using this display format instead:


    Hello, is it possible that at the moment this snippet is not working?

    ihor developer

    The snippet should work, the API wasn’t changed – please make sure that you added it via the Code Snippets plugin, then the %listing_url% token should be available in the attribute Display Format.


    Hi, how to change the snippet to get %listing_url% parameter and insert it on seller’s block area?

    Also, I would to grab the listing title and insert both on a whatsapp link, for example:

    Thank you very much!

    ihor developer

    Please try using our new community forum This one is being deprecated and we will switch it to read-only within a few days.

Viewing 8 posts - 21 through 28 (of 28 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.