Hi.
I'd like to show list of all user's interests. How can I do that?
Hi.
I'd like to show list of all user's interests. How can I do that?
Try using custom fields.
Thank you, but could you explain it as simple as possible? I'm beginner in this matter :)
See Using Custom Fields « WordPress Codex.
If you want extra options in your user profile, you'll have to look for a plugin.
Adam, if you are using Aleph, to output the list of interests you have to use the following inside a posts loop (like in a blog post):
<?php aleph_the_author_interests(); ?>
And this in an user loop:
<?php aleph_the_user_interests(); ?>
Thanks, Detective. And when I want to display list of all users' interests? I think about list like in your Gaming Codes plugin, where I had list of people with Nintendo, with XBox, with PSN etc. ...
Currently there is no functionality to display all interests. Honestly, i didn't think about that, it's very interesting :)
Please try the following:
<?php
$interests = get_terms('author-interests');
if (!empty($interests)) {
$terms = array();
foreach ($interests as $interest)
$terms[] = aleph_get_interest_link($interest);
echo '<ul><li>' . implode('</li><li>', $terms) . '</li></ul>';
}
?>
Does this work?
It works, you saved my life :) Thank you so much.
This topic has been closed to new replies.