Problem insert_php and shortcode
-
I am trying to integrate WordPress users with Participants Database as described on your website: https://xnau.com/using-participants-database-with-wordpress-users/
When I insert the shortcode into the page using a PHP plugin, I am getting a Parse error:
Code on page:
[insert_php]
echo do_shortcode(‘[pdb_list filter=”user_login=’ . $current_user->user_login . ‘”]’);
[/insert_php]Page output:
Parse error: syntax error, unexpected T_VARIABLE in /home/content/01/12721101/html/CAG/wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 2
This occurs with both [pdb_list] and [pdb_record] in several different themes and with multiple php plugins. The code works fine if I put it directly into the page template file (although sometimes the formatting is a bit screwy). I am experimenting with various themes and would prefer not to rebuild the page template files each time I change themes.
- The topic ‘Problem insert_php and shortcode’ is closed to new replies.