Kinda confused transitioning from ACF

Support General Kinda confused transitioning from ACF

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30697
    MajorPayneMajorPayne
    Participant

    My setup now is Oxygen, ACF Pro, Theme Code Pro and of course CPT. I'm not well versed in PHP so Theme Code Pro helps a lot by automatically generating the correct PHP parts. For instance, I need a single line of text on the site home page, Theme Code Pro would generate

    <?php the_field( 'call_to_action_text' ); ?>

    In Oxygen I add a Code Block with the above PHP code on the page where I want the text to appear.

    From the WP Dashboard > Pages > "Home" I see a single field, add my custom text > Publish and that text appears on the page.

    I'm stuck trying to figure out how to replicate this using MB though. Does MB auto generate PHP, if so where do I find that?

    #30705
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Currently, Meta Box does not have a feature Theme Code like that. You can output the field value by using the helper function rwmb_meta(), it works simply like the function the_field(). Please read more here https://docs.metabox.io/displaying-fields/#using-code

    Meta Box also supports generating the code that use to create the custom fields, meta boxes and CPT as well. Please read more here https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code

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