Transform url custom field into a button

Support General Transform url custom field into a buttonResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26781
    SaraKaySaraKay
    Participant

    Hello,

    Could I please get some how on how to retrieve each custom field from a custom post type and display it as a button on the front end.

    Thanks.

    #26793
    Long NguyenLong Nguyen
    Moderator

    Hi Sara,

    Thank you for contacting us.

    For example, you can wrap the field value in a <a> tag and a <button> tag to make the button clickable.

    <a href="<?php echo rwmb_meta( 'field_URL_id' ); ?>">
        <button>Click me!</button>
    </a>

    Please follow this documentation to know how to output the field value https://docs.metabox.io/displaying-fields/.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.