• Resolved kceall

    (@kceall)


    I have created my page in .php and I am trying to set a variable depending on the user role but the code seems to just show up on the page.

    the code is something like this inside php tags:

    echo do_shortcode('[O_U user_role="myCustomUserGroup"] $var = $wpdb->get_results("query"); ?>[/O_U]');

    https://ww.wp.xz.cn/plugins/user-specific-content/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Set php variables in shortcode’ is closed to new replies.