Custom Fields
Re-Envisioned
Support Meta Box Builder Display URL custom field as a button dynamically without using a page builder

  • Creator
    Topic
  • #27517

    Hey wondering if someone could help me!
    I have so far avoided completely using a page builder but I’m stuck on this one! I don’t know if I’m thinking about it the wrong way but anyway hopefully someone here can give me a helping hand!
    I created a URL field admin side and I want to display the URL field as a button in the frontend - each post will have a different URL so needs to be dynamic!
    What am I missing!
    Trying not to have to use a page builder as I have site almost complete and was able to do without 😂😂😂 hopefully this issue doesn’t ruin my mojo lol

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #27547
    Long Nguyen
    Moderator

    Hi,

    Thank you for reaching out.

    After creating the custom fields with MB Builder, please follow the documentation to know how to display field value on the frontend by using the code https://docs.metabox.io/displaying-fields/

    #27564

    I have already checked this! Using the shortcode it does not display as a link in the frontend of the site! Just as plain text!

    #27570

    Hey I have tried everything. The url is just not clickable on the frontend.

    I am using the shortcode.

    #27591
    Long Nguyen
    Moderator

    Hi,

    You need to show the field value in 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>

    or create your own shortcode to use the shortcode in the editor https://codex.wordpress.org/Shortcode_API

    #27592

    A url should just be clickable by default. I have switched to Advanced Custom Fields.
    I bought Metabox because it said it would be easy. I couldnt understand your docs so resorted to ACF.

    Hopefully you'll fix this for the future. Maybe even add a custom button field that can be shown in the frontend with a shortcode.

    #27605
    Long Nguyen
    Moderator

    Thank you for your feedback.

    I will inform the development team to improve the shortcode to show the link on the frontend for the field type url.

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