Custom Field Data in Shortcode nutzen

  • Hallo zusammen,


    ist es möglich ein custom field (metabox) innerhalb eines Shortcodes einzubinden? Ich habe es so versucht, leider ohne Erfolg:


    PHP
    <?php echo do_shortcode('[atkp_product id='<?php rwmb_the_value( 'aftk-id' ) ?>' field='totalprice'][/atkp_product]'); ?>

    Leider funktioniert der Code schon nicht, wenn ich einen statischen Wert einfüge, wie:


    PHP
    <?php echo do_shortcode('[atkp_product id='30' field='totalprice'][/atkp_product]'); ?>

    Kann mir da jemand weiterhelfen? Danke!