bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

Adding Location to User's Post Info

(3 posts)
  • Started 1 year ago by citizenkeith
  • Latest reply from GTim
  • This topic is not resolved
  1. citizenkeith
    Member

    "Location" is in the user Profile, but doesn't appear when they post. I'd like to add it, so that it reads "Location: Ohio" or whatever.

    I tried guessing and inserted this:

    <?php post_author_location(); ?>

    But that didn't work. :(

    And finally, are all these functions listed somewhere?

    Posted 1 year ago #
  2. citizenkeith
    Member

    bump

    Posted 1 year ago #
  3. I doubt that this is the most efficient way, but it seems to work. Add the following code in post.php in the default theme (/bb-templates/kakumei/post.php), you probably want it within the .threadauthor div.

    <?php
      $puser = bb_get_user( get_post_author_id() );
      if ( isset( $puser->from ) ) {
        echo $puser->from;
      }
    ?>

    It is not possible to do this with a plugin yet because there is no hook there, but there is a Trac ticket for it.

    Also, I compiled a list of all template functions.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.