Tet banner

Custom Fields
Support General How to add custom field URL value to a button?

  • Creator
  • #30006
    Resolved s.liem@me.com


    I want to add the value of a URL-Field to a button, currently set up as seen on this screenshot.

    But on frontend it's not showing the URL pasted in the button_url field, as you can see here (mouse hovered on button, but mouse is not displayed on screenshot).

    Instead of the URL added in the custom field, the button will redirect to the URL of the post.

    How can I insert the URL to this button?

    Thank you in advance and kind regards,

Viewing 1 replies (of 1 total)
  • Author
  • #30012
    Long Nguyen


    The helper shortcode only shows the raw URL on the frontend without styling in a button like that. Did you add another button and hovering it?

    To show the URL field value in a button, you need to assign it to the attribute href of the <a> tag to make it clickable. Just like

    <a href="<?php echo rwmb_meta( 'field_url_id' ) ?>">Button Link</a>

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.