Hello, I am in the process of redoing the ad model to add some modifications and among these I have been trying for some time to recover an attribute from the advertiser profile to make a button but to no avail.
Let me explain: each user has the possibility of giving their WhatsApp or messenger number retrieved under “hp_whatsapp” and “hp_messenger” in meta_key.
As soon as I pass it into shortcode I either crash Wordpress or the data is not recovered even though the ID is recovered.
but I notice that the rate of contact between users is dropping due to the outdated messaging service, so I d’ like to give more importance to external contacts by putting 2 other buttons at the same level, such as the simple “reply”.
Please specify which shortcode you mean. You can add a WhatsApp button, for example, using this documentation: How to add a WhatsApp button - HivePress Help Center. Also, you can simply add a Reply button by installing the Messages extension.
Hi I actually already have a whatsapp button, I am looking to modify the template in this one the seller profile will no longer be visible so inserting a whatsapp button in this one will be of no use.
I already have the message plugins I am looking to make 2 other identical buttons below this one for more visibility.
My goal is simply to retrieve 2 data from the vendor profile (whatsapp and messenger) already stored in the database and thus create 2 shortcodes example [whatsapp] [messenger] to be able to make buttons on the new template
By using codes found I tested this which returns an empty list
Sorry, I can’t quite understand the desired result, but the shortcode itself seems to be ok - it should display the value of the listing attribute passed to the “whatsapp” shortcode parameter. I recommend using this code snippet, though Attribute as shortcode - #13 by ihor Then you can use this shortcode within the listing page template, e.g. if you have a Messenger attribute (with the field name “messenger”), you can do this: