Is it possible to move one attribute from hp-listing__attributes–primary into hp-listing__details–primary section? For example I have image file as primary attribute, but I want to move it into details primary section
Yes, it’s possible, but this would require customizations Customizing Templates I HivePress Developer Docs - YouTube since this area is outside the available Display Areas for attributes. We also plan to add a custom Attributes block that will allow creating and assigning custom display areas.
Yes, i understand this. But how to get this attribute value? If for example the field is called “logo”, how do i get this specific attribute, not the whole primary attribute section?
If you created a custom template part and inserted it into the listing_view_page template as described in the dev tutorial above, please try getting the attribute value this way:
If logo has the Attachment type, you can get the URL this way:
Is this the right way to get url? As if I use get_logo() it gets number value, but I need the attachment URL. But if I use get_logo_url() basically it returns empty value. But the field is attachment.
Please make sure that there is 2 underscores between words logo and url in
It should be like this, correct? <?php echo $listing->get_logotipas__url() ?>
What i’m getting is this value: 3544
Instead it should get this value I think (Image link in wordpress)
As I managed to make this value as image in attributes field, but I need to move it up to the header, and also make it as Image.
Thanks for reporting this, the bug is confirmed and we’ll fix it as soon as possible.
As a temporary solution please try this PHP code snippet to get attachment url
Thank you, it worked
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.