Title: Theme Functions
Last modified: August 20, 2016

---

# Theme Functions

 *  [Zocadious](https://wordpress.org/support/users/zocadious/)
 * (@zocadious)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/theme-functions-2/)
 * I am using WP-Members plugin and am wanting to add some hooks to the themes function.
   php, but unable to do so so that I can use the short codes for the plugin. Where
   do I put these hooks. They look like this.
    add_filter( ‘wpmem_member_links’,‘
   my_member_links’ ); function my_login_redirect() { // return the url that the
   login should redirect to return ‘[http://beerandwineconnoisseurs.com/?page_id=104&#8217](http://beerandwineconnoisseurs.com/?page_id=104&#8217);;}
   add_filter( ‘wpmem_member_links’, ‘my_member_links’ ); function my_member_links(
   $links ) { // get the current_user object global $current_user; get_currentuserinfo();
 *  // format the date they registered
    $regdate = strtotime( $current_user->user_registered);
 * // and the user info
    $str = ‘<div id=”theuser”> <h3 id=”userlogin”><span style
   =”color: white”>’ . $current_user->user_login . ‘</span></h3> <div id=”useravatar”
   >’ . get_avatar( $current_user->ID, ’82’ ) . ‘</div> <dl id=”userinfo”> <dt>Member
   Since</dt> <dd>’ . date( ‘M d, Y’, $regdate ) . ‘</dd> <dt>Location</dt> <dd>’.
   get_user_meta( $current_user->ID, ‘city’, true ) . ‘, ‘ . get_user_meta( $current_user-
   >ID, ‘thestate’, true ) . ‘</dd> <dt>Subscription</dt> <dd>’ . get_user_meta(
   $current_user->ID, ‘month_subscription’, true ) . ‘</dd> </dl> </div> <hr />’;
 *  // tag the original links on to the end
    $string = $str . $links;
 *  // send back our content
    return $string; } add_filter( ‘wpmem_logout_redirect’,‘
   my_logout_redirect’ );
 * function my_logout_redirect()
 * {
 *  // return the url that the logout should redirect to
 *  return ‘[http://beerandwineconnoisseurs.com/&#8217](http://beerandwineconnoisseurs.com/&#8217);;
 * }
    I have added this to other functions.php, but can not find where to add in
   the picture-perfect theme
 * [http://wordpress.org/extend/themes/picture-perfect/](http://wordpress.org/extend/themes/picture-perfect/)

The topic ‘Theme Functions’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/picture-perfect/1.3.3/screenshot.
   png)
 * Picture Perfect
 * [Support Threads](https://wordpress.org/support/theme/picture-perfect/)
 * [Active Topics](https://wordpress.org/support/theme/picture-perfect/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/picture-perfect/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/picture-perfect/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Zocadious](https://wordpress.org/support/users/zocadious/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/theme-functions-2/)
 * Status: not resolved