I am trying to make an Instagram-box on the author profile of my page. I need every profile to be different, and to do that I need to change the ID in my Instagram Widget-shortcode on every page. The shortcode for the widget is:
[instagram-feed id="" imageres="full" showheader="true" showbutton="true" buttoncolor="#fff" buttontextcolor="#000" showfollow="false"]
To change the id on every page I have used the_author_meta('instagram');. The idea was to do this:
echo do shortcode( '[instagram-feed id="<?php the_author_meta('user_email') ?>" imageres="full" showheader="true" showbutton="true" buttoncolor="#fff" buttontextcolor="#000" showfollow="false"]');
But it wont generate because it's PHP inside a shortcode. I have also tried this:
echo ( '[instagram-feed id="' );
the_author_meta('instagram');
echo ( '" imageres="full" showheader="true" showbutton="true" buttoncolor="#fff" buttontextcolor="#000" showfollow="false"]' );
which generated the code correctly with a different ID on every profile:
[instagram-feed id="1427468000 (and something different on other profile)" imageres="full" showheader="true" showbutton="true" buttoncolor="#fff" buttontextcolor="#000" showfollow="false"]
But now it will now only display as text, not be the result of the code. Anyone know how I can make this work?
$author_ig = '[instagram-feed id="' . get_the_author_meta('instagram') . '" imageres="full" showheader="true" showbutton="true" buttoncolor="#fff" buttontextcolor="#000" showfollow="false"]'; echo do_shortcode($author_ig);
– czerspalace Jan 21 '15 at 22:19