- Converting a wordpress plugin?
- New images for 'Free Social Links' widget
#1 Oct 10, 2018 16:22
In response to a query on how to get the correct syntax for a link/button widget :: http://forums.b2evolution.net/how-do-i-send-logged-in-user-id to provide quick access to a user's posts.
I settled on using a FreeHTML widget but the problem there was the inability to use php code to pick up the [$current_User->ID]
<script> var uid = "<?php echo $current_User->ID; ?>"; </script>
<script> url="http://calstock.org.uk/?disp=useritems&user_ID=" + uid; document.write("<a href=" + url + ">My Posts :: <em>All collections</em></a>"); </script>
More code is needed if you want to limit the output to a specific collection