BTW…
The real problem is that somewhere the PHP gets caught and put into a comment instead, and therefore is not received by the Exec PHP plugin.
The Chrome Inspector shows this line instead:
<!–?php echo get_user_meta( %id%, ‘weapon’, true); ?–>
Hi JamTheMan
I don’t think you need to do that.
There is a way to create custom user meta fields in the user profile. and to display them in the template. Have you figured out how to do that? Let me know if the UI is not so straight forward.
Cheers
Yeah… I now that… And that btw works great!
The thing is just that I already have all the extra user details added to the WordPress profiles, with another plugin, and it would therefore be much easier if i could use those values in your plugin, instead of remaking them all…
This of cause could be done with some rather simple SQL updates, but then it would be great if all the custom meta fields were not added under “Contact Info” in the user profile, but maybe under a new node called “Other Info” or something. Just makes more sense to the users in case the new fields have nothing to do with contact info…
So if there is no way to allow the PHP to go through, I’ll just have to do it the other way. Thanks in any case—
-Jam
Hi Jam
I am thinking about adding a filter to the plugin that will allow you to add your own tags and quiery the stuff easier in your case. This way you will be able to extend the plugin for your needs and not worry about modifying it for the future case. I will write a short tutorial that will do that. Would that work for your case?
Cheers Enej
Yeah, that sounds like it would be perfect…
Thanks so much 😀
Hi Enej,
Congrats on the great plug-in. I have the exact same need as Jam (to have the ability to render a shortcode from another plug-in into the template).
You mentioned you were working on adding a filter and writing a short tutorial on how to use this. Have you made any progress on this?
Thanks!!
Hi aplussideas and Jam
I am sorry I didn’t post some sort of tutorial earlier. If you look at the code and are compftable with filters. you can use the
‘people_list_shortcode’ filter to change the html that is being ouputed to the theme.
try something like
add_filter('people_list_shortcode','example_people_list_shortcode',10); //
function example_people_list_shortcode($html){
return $html."the end of the template";
};
you can also try the ‘people_list_fields_display’ filer
and the
‘people_list_custom_fields’
look at the code in the file people-list.php starting at line 726 for more info.
I hope that helps