Forums

[resolved] Display User Meta In Sites (8 posts)

  1. mdevaney
    Member
    Posted 11 months ago #

    trying to display user meta in the individual sites, when someone signs up they have a page, this page would say "Welcome USERNAME login to edit this page, if you are not USERNAME, get your own site here"

    so i know that i can pull it using the user ID but how to i pull it automatically relating the site to the userID?

    ugg, this is killing my brain.

  2. mdevaney
    Member
    Posted 11 months ago #

    okay so in <?php get_user_meta($user_id, $key, $single) ?> you can grab the user meta, thats awesome but only if you know the user_id # how could i grab the "owner" of the sub site's user id?

  3. mdevaney
    Member
    Posted 11 months ago #

    '<?php get_user_id_from_string( 'user@example.com' ); ?>' get the user id so if it should look something like this right? --

    <?php
      $user_id = get_user_id_from_string( ????????? );
      $key = 'CUSTOMMETA';
      $single = true;
      $user_last = get_user_meta( $user_id, $key, $single);
      echo '<p>$CUSTOMMETA</p>';
    ?>

    notice the ?????????

  4. mdevaney
    Member
    Posted 11 months ago #

    there should be a shortcut like <?php get_blogowners_meta ($key) ?>

  5. mdevaney
    Member
    Posted 11 months ago #

  6. mdevaney
    Member
    Posted 11 months ago #

    figured it out i think everything is under '<?php the_author_meta( 'META' ); ?>'

  7. Andrea_r
    team pirate
    Posted 11 months ago #

    It's the same function you would us on a single site.

  8. mdevaney
    Member
    Posted 11 months ago #

    yeah im still having issues with it, it keeps breaking giving me errors

Reply

You must log in to post.

About this Topic