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: https://api.whatsapp.com/send?text=Listing_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: https://api.whatsapp.com/send?text=%listing_url%

Viewing 4 posts - 21 through 24 (of 24 total)

You must be logged in to reply to this topic.