I have an attribute called url, and I’m adding this button on the sidebar of the listings page
what happens is that the URL will get the data form the attribute, but I don’t know how to get the data form attributes
here’s how it looks right now
add_filter(
'hivepress/v1/blocks/page',
function( $args ) {
return hivepress()->helper->merge_arrays(
$args,
[
'blocks' => [
'before' => [
'type' => 'content',
'content' => '<div class="my-custom-wrapper">',
'_order' => 1,
],
'after' => [
'type' => 'content',
'content' => '</div>',
'_order' => 1000,
],
'custom_button' => [
'type' => 'content',
'content' => '<a href="' . get_post_meta( get_the_ID(), 'url', true ) . '" class="hp-listing__action hp-listing__action--review hp-link"><i class="hp-icon fas fa-link"></i> LINK</a>',
'_order' => 4,
],
],
]
);
}
);
``