• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nSiteful Web Builders

Building a Better Web - One Site at a Time.

  • Home
  • About
    • Testimonials
    • Resources
    • Partner With Me
    • Frequently Asked Questions
  • Web Sites
  • Online Marketing
  • WordPress Support
    • Customized WordPress Training
    • 60-for-60 Sessions
  • Web Applications
  • Blog
    • At-A-Glance
    • Blog Articles Grouped by Category
    • Case Studies
    • General
    • Portfolio
    • Reviews
    • Snippets
    • Techniques
    • Projects
  • Contact
    • Purchase Retainer Consulting Hours
    • About Retainer Consulting Hours
    • Book a Meeting with Jeff
    • Tell Me About Your Web Project
    • nSiteful Newsletter Archives
    • nSiteful Rewards
Closeup of Membership Card Account Nav Tab

By Jeff - 9/7/2024
Cats: Techniques · Tags: CSS, MemberPress, Membership Sites

techniques

Create a Membership Card for a MemberPress Site

On this page...

Toggle
  • Background & Screen Shots
  • The Code for the Membership Card
    • Here is the code for the “Membership Card” Account Nav Tab
    • Here is the CSS
    • Custom Shortcode for “Member Since”

This article was prompted by a  question posed in the MemberPress Unofficial User Group on Facebook. (Most of the screen captures can be enlarged with a click.)

If you would like any explanations that I haven’t provided, let me know in the comments section.

Background & Screen Shots

My client, the Southeastern Bluegrass Association (SEBA), wanted to make printable membership cards for their members, so I created them using MemberPress shortcodes and some CSS.

Here’s what logged-in members see when they navigate to the “Membeship Card” tab on their account pages:

Membeship Card tab of Account Page
Membeship Card tab of Account Page

And here is a closeup:

Closeup of Membership Card Account Nav Tab
Closeup of Membership Card Account Nav Tab

And here’s what one sees when once prints the page (either by clicking on the “Print” button or by using the browser’s print function):

Print dialog for membership card
Print dialog for membership card

Here’s a screen capture of the “Membership Card” Account Nav Tab (copy-able code follows)

Account Nav Tab code
Account Nav Tab code

The Code for the Membership Card

Here is the code for the “Membership Card” Account Nav Tab

All of the shortcodes in the highlighted rows — except for line 10, which is a custom shortcode I created (see below) — are documented here in the MemberPress Knowledge Base.

[mepr-show if memberships="182,199"]
<h3 class="no-print">SEBA Membership Card</h3>
<p class="no-print"><a href="javascript:window.print();">Print</a> your SEBA Membership Card.</p>
<p class="no-print"><button onClick="window.print();">Print Membership Card</button></p>
<div class="membership-card small">
<div class="logo"><img src="/wp-content/uploads/cropped-seba-site-logo-200x124-1.png" /></div>
<div class="seba">SouthEastern Bluegrass Association</div>
<div class="member-name">[mepr-account-info field="full_name"]</div>
<div class="membership-product">[mepr-list-subscriptions status="active"]</div>
[member_since]
</div>
[/mepr-show][mepr-hide if memberships="182,199"]You do not have an active SEBA Membership.[/mepr-hide]

Here is the CSS

.membership-card.small {
	border: 6px solid var(--seba-blue);
	width: 3.5in;
	height: 2in;
	margin-inline: auto;
	padding: 0.25in;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.membership-card.small > div {
	text-align: center;
}
.membership-card.small .logo {
	scale: 33%;
	margin: -40px 0 -40px;
	width: 100%;
	height: 100%;
	display: block;
	margin-inline: auto;
}
.membership-card.small .seba {
	font-size: 1rem;
	font-style: italic;
}
.membership-card.small .member-name {
	font-size: 1.3rem;
	font-family: "Times New Roman", times, serif;
	font-style: italic;
}
.membership-card.small .membership-product {
	font-size: 0.9rem;
	line-height: 120%;
}
.membership-card .membership-product ul {
	margin: 0;
}

Custom Shortcode for “Member Since”

“Member Since” is a custom field that was set up in the MemberPress Settings tab. Here is the code for fetching and returning that field value, if it exists in the usermeta table:

function seba_member_since() {
	$current_user = wp_get_current_user();
	$current_user_member_since = get_user_meta($current_user->ID, 'mepr_member_since', true);
	if ( isset( $current_user_member_since ) && !empty( $current_user_member_since ) ) {
		$output = '<div class="member-since">Member Since ' . $current_user_member_since . '</div>';
		return $output;
	} else {
		return;
	}
}
add_shortcode('member_since', 'seba_member_since');

And here’s a screen shot of a membership card for a member who has a “member_since” value recorded:

Membership card showing "Member Since" year
Membership card showing “Member Since” year

Like what you see? Share with others and join my mailing list. No long-term commitment, unsubscribe any time.

Related Posts

  1. Southeastern Bluegrass Association Membership Site
  2. Avoid Direct Styling; Use CSS Instead
  3. MemberPress: How to Create a Custom MemberPress Course Progress Page
  4. Scam Alert: ATT/Yahoo! Phishing Scam 6/4/2024
  5. Give Gutenberg a Chance

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

mailchimp signup

Subscribe to get notified when new articles are published. Unsubscribe any time. No spam. I promise. Check out my newsletter archives.

social

Twitter Facebook LinkedIn

Recent Articles

  • Post-Specific CSS for WordPress October 5, 2026
  • You built an online course, but they haven’t come. September 16, 2026
  • Custom MemberPress Pricing Pages December 19, 2025
  • CSS Data Attribute Override December 11, 2025
  • MemberPress Rules Using Custom Taxonomies and Custom Roles December 10, 2025

Filter By Category/Tag

Categories

  • Case Studies (8)
  • For Staff (1)
  • General (73)
  • Portfolio (7)
  • Reviews (14)
  • Snippets (24)
  • Techniques (52)

Popular Tags

Advanced Custom Fields Blogging Child Themes Content Marketing CSS Customer Service Custom Fields Custom Post Types Diagnostics Domain Names Facebook FooGallery Genesis Hosting HTML Images iPhone Libra Live Chat Marketing Media MemberPress MemberPress Courses Membership Sites Mobile-Friendly MySQL Photo Gallery php Pinterest Plugins Post Formats Pricing Project Management SEBA SEO Seth Godin Shortcodes Social Networking Surveys Taxonomies Twitter Video Web design Web forms WordPress

Footer

Background

Web Sites | WordPress Support | Web Applications.

Formally trained in liberal arts and education (I have a B.A. in Government from Harvard and studied Secondary Education at Rutgers Graduate School), I have honed my skills in the communication arts and sciences as a teacher, trainer, instructional designer, writer, photographer, calligrapher, helpdesk manager, database programmer, and multimedia developer.

(I've also been a group counselor, waiter, bartender, bicycle messenger boy, computer salesman, carpenter's helper, financial analyst, and school board president.)

Tech

Systems since 1983.
Web sites since 1994.
PHP since 2001.
WordPress since 2007.

Contact

Book Meeting
770-772-5134
Email Jeff
Send Money
All Ways

Copyright 2026, nSiteful Web Builders, Inc.

Cookies Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}
https://iframe.mediadelivery.net/embed/392008/42d18bc1-2adc-4741-b733-053d08d09c32
https://vz-000c5976-3ab.b-cdn.net/42d18bc1-2adc-4741-b733-053d08d09c32/play_720p.mp4

Receive occasional emails from Jeff