Home Forums Newsletter Plugin Support Feature Request: Add WP User variables

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #26534
    Anonymous
    Inactive

    Hey there,
    i build my own theme and was astonished there is no support for each individual WordPress login.

    Use case:
    there are two WordPress accounts and both people write newsletters. They sign their newsletter with name and bio.

    Solution:
    provide templates like {name} for the writer of the Newsletter

    Workaround:

    
    $current_user = wp_get_current_user();
    $current_user_login = $current_user->user_login;
    $current_user_first = $current_user->user_firstname;
    $current_user_last = $current_user->user_lastname;
    $current_user_bio = get_the_author_meta('description', $current_user->ID);
    

    etc.

    And then use it this:

    <div>
    <!--#html #--> <strong><?php echo $current_user_first ?> <?php echo $current_user_last ?></strong>
    <br><?php echo $current_user_bio ?><!--#/html#-->
    </div>

    … this forum system is bugged …

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.