---
import Layout from '../../layouts/Layout.astro';
const { slug } = Astro.params;
let res = await fetch(`https://norian.studio/wp-json/wp/v2/dinos?slug=${slug}`);
let [post] = await res.json();
// The getStaticPaths() is required for static Astro sites.
// If using SSR, you will not need this function.
export async function getStaticPaths() {
let data = await fetch("https://norian.studio/wp-json/wp/v2/dinos");
let posts = await data.json();
return posts.map((post) => ({
params: { slug: post.slug },
props: { post: post },
}));
}
---
<Layout title={post.title.rendered}>
<article>
<h1 set:html={post.title.rendered} />
<Fragment set:html={post.content.rendered} />
</article>
</Layout>

Step 6: Prepare Your Import File
You need the Import Members From CSV Add On to import your data. You must combine the data from your MemberPress exports into a single CSV file formatted for Paid Memberships Pro.
- Download the starter import template from the Import Members From CSV Add On.
- Map the PMPro user_login column to the “username” column from the Members export.
- Map the PMPro user_email column to the “email” column from the Members export.
- Map the PMPro first_name column to the “first_name” column from the Members export.
- Map the PMPro last_name column to the “last_name” column from the Members export.
- Enter the word “subscriber” in the role column to give your users the standard WordPress role.
- Enter the numerical ID for the PMPro level in the membership_id column.
- Map the PMPro membership_initial_payment column to the “price” column from the Subscriptions export.
- Map the PMPro membership_billing_amount column to the “price” column from the Subscriptions export.
- Map the PMPro membership_cycle_number column to the “period” column from the Subscriptions export.
- Map the PMPro membership_cycle_period column to the “period_type” column from the Subscriptions export.
- Map the PMPro membership_status column to the “status” column from the Members export. You must only import users with an “active” status.
- Map the PMPro membership_startdate column to the “registered” column from the Subscriptions export. You must format this date as YYYY-MM-DD.
- Map the PMPro membership_timestamp column to the “created_at” column from the Subscriptions export. You must format this date as YYYY-MM-DD.
- Map the PMPro membership_subscription_transaction_id column to the column labeled “subscr_id” in your MemberPress export. You must not include a Subscription ID for one-time payments.
- Map the PMPro membership_enddate column to the “expires_at” column. You must only include an expiration date for one-time payments. You must leave this blank for recurring subscriptions.
- Map the PMPro pmpro_stripe_customerid column to the “_mepr_stripe_customer_id” column if you use Stripe.
Step 7: Import Your Data
Always test your import with a small batch of users first to ensure your file is formatted correctly.
- Create a test CSV file containing only five to ten rows of user data.
- Navigate to Users > Import Members in your WordPress dashboard.
- Upload your test CSV file.
- Select the checkbox that says “Update user when a username or email exists”.
- Click Import.
- Navigate to Memberships > Members to check that the data looks correct.
- Run the final import with your full CSV file once you confirm the test worked.
Step 8: Resume Your Live Website
You need to connect your payment gateway to process future renewals and start accepting new members.

Leave a Reply