Home › Forums › Front-end Issues › Shortcode doesn't work in Page › Reply To: Shortcode doesn't work in Page
you cant have a dynamic solution with ACF shortcodes.
but as i write before if you create a custom template for that page.
and use there something like that
<?php the_content(); ?>
<?php if ( is_user_logged_in() ) {
$userid = get_current_user_id();
get_userdata( $userid );
get_field('sms2', 'user_'. $userid );
}?>
of course you need to add the post loop arround, and maybe add a user-role filter too. but i hope that info help you to do it on your own
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.