• Hi

    Is it possible to change the background color of a post or add a default image to the body of that post?

    what im trying to do is if the member is free there post has the white background, If the member is paid there post has a different look ie background font ecs…

    i need to know how wishlist member tags the classes

    with something like this

    // filter the body class
    add_filter( 'body_class', 'adzoom_wishlist_member_classes' );
    
    // function to add body class based on wishlist member 180 or 365 day
    function adzoom_wishlist_member_classes ($classes) {
            // read the wishlist member information somehow
            $userid = 'how to get userid?';
            $key    = 'what is the wishlist member key';
            $single = true; // probably only want a single piece of information, right?
    
            // get the wishlist member level based on the meta key set above
            $wishlistlevel = get_user_meta( $userid, $key, $single );
    
            // pseudocode to add class based on information stored by wishlist member
            if ($wishlistlevel == '365') {
                    // add 'year-member' to the $classes array
                    $classes[] = 'year-member';
            }
            else if ($wishlistlevel == '180') {
                    // add 'half-year-member' to the $classes array
                    $classes[] = 'half-year-member';
            }
    
            // return the $classes array no matter what
            return $classes;
    }

    then

    <body <?php body_class() ?>>

    i just need to find the key or 1 piece of info

    anyone have idea?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wishlist member plugin member level question’ is closed to new replies.