• Resolved dmldml

    (@dmldml)


    I want to embed a Google Sheet and only show the rows where Column A contains the email address of the currently logged-in WordPress user.

    I’m using the “Insert PHP Code Snippet” plugin by xyzscripts to grab the email address of the currently logged-in user. It created the shortcode:

    [xyz-ips snippet=”user-email”]

    which executes the following code:

    <?php $current_user = wp_get_current_user(); ?>
    <?php echo $current_user->user_email;?>

    I’m trying to nest that shortcode inside the Inline Google Spreadsheet Viewer shortcode, as follows:

    [gdoc key=”https://docs.google.com/spreadsheets/d/123567/edit?usp=sharing&#8221; query=”select * where A = ‘[xyz-ips snippet=”user-email”]'”]

    But this doesn’t work. It renders properly if I hard-code the email address into the Inline Google Spreadsheet Viewer shortcode, but I need it to dynamically use the email address of the currently logged-in WordPress user.

    How can I solve this?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Nested Shortcodes’ is closed to new replies.