Profile pages without cover image
-
I have cover images optional.
User profile pages without a cover image can reduce their page size by adding this php code to your (child) theme into /wpum/profiles/cover.php// Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit; $cover_image = get_user_meta( $data->user->ID, 'user_cover', true ); if($cover_image == '') { ?> <div id="header-cover-image-none" style="width: 100%; z-index: 1; height: 175px; position: relative;"> <?php } else { ?> <div id="header-cover-image" style="background-image: url(<?php echo $cover_image; ?>);"> <?php } ?> <div id="header-avatar-container"> <a href="<?php echo esc_url( wpum_get_profile_url( $data->user ) ); ?>"> <?php echo get_avatar( $data->user->ID, 128 ); ?> </a> </div> </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Profile pages without cover image’ is closed to new replies.