Ingesting Data Into OpenSearch Using Apache Kafka and Go

Scalable data ingestion is a key aspect of a large-scale distributed search and analytics engine like OpenSearch. One of the ways to build a real-time data ingestion pipeline is to use Apache Kafka. It's an open-source event streaming platform used to handle high data volume (and velocity) and integrates with a variety of sources including relational and NoSQL databases. For example, one of the canonical use cases is the real-time synchronization of data between heterogeneous systems (source components) to ensure that OpenSearch indexes are fresh and can be used for analytics or consumed downstream applications via dashboards and visualizations.

This blog post will cover how to create a data pipeline wherein data written into Apache Kafka is ingested into OpenSearch. We will be using Amazon OpenSearch Serverless and Amazon Managed Streaming for Apache Kafka (Amazon MSK) Serverless. Kafka Connect is a great fit for such requirements. It provides sink connectors for OpenSearch as well as ElasticSearch (which can be used if you opt for the ElasticSearch OSS engine with Amazon OpenSearch). Sometimes though, there are specific requirements or reasons which may warrant the use of a custom solution.

Revolutionizing the Web: Emerging Trends and Innovations in Web Development

Web development has become vital for businesses and organizations globally in today's quickly changing digital ecosystem. The significance of staying current with emerging developments in web development cannot be overstated. New frameworks, languages, and approaches are often introduced in the web development industry, which is continually evolving.

By keeping up with these changes, developers may apply the newest tools and techniques to enhance user experiences, speed up websites, and stay one step ahead of the competition.

Precision at Scale: Unveiling the Secrets of Quality Engineering in Data Engineering

In today's data-driven world, organizations rely heavily on data engineering to transform raw data into actionable insights. However, with the ever-increasing volume, velocity, and variety of data, ensuring data quality has become a significant challenge. This is where quality engineering plays a pivotal role. Quality engineering in the data engineering domain not only ensures accuracy and reliability but also enables organizations to make informed decisions based on trustworthy data. In this article, we delve into the secrets of quality engineering in data engineering, exploring its principles, techniques, and best practices to achieve precision at scale.

Search Keywords: 

Writing CSS In 2023: Is It Any Different Than A Few Years Ago?

Is there anything in the front-end world that’s evolving faster than CSS these days? After what seemed like a long lull following blockbusters Flexbox and Grid, watching CSS release new features over the past few years has been more like watching a wild game of rugby on the telly. The pace is exciting, if not overwhelming at the same time.

But have all these bells and whistles actually changed the way you write CSS? New features have certainly influenced the way I write CSS today, but perhaps not quite as radically as I would have expected.

And while I’ve seen no shortage of blog posts with high-level examples and creative experiments of all these newfangled things that are available to us, I have yet to see practical applications make their way into production or everyday use. I remember when Sass started finding its way into CSS tutorials, often used as the go-to syntax for code examples and snippets. I’m not exactly seeing that same organic adoption happen with, say, logical properties, and we’ve had full browser support for them for about two years now.

This isn’t to rag on anyone or anything. I, for one, am stoked beyond all heck about how CSS is evolving. Many of the latest features are ones we have craved for many, many years. And indeed, there are several of them finding their way into my CSS. Again, not drastically, but enough that I’m enjoying writing CSS more now than ever.

Let me count the ways.

More And More Container Queries

I’ll say it: I’ve never loved writing media queries for responsive layouts. Content responds differently to the width of the viewport depending on the component it’s in. And balancing the content in one component has always been a juggling act with balancing the content in other components, adding up to a mess of media queries at seemingly arbitrary breakpoints. Nesting media queries inside a selector with Sass has made it tolerable, but not to the extent that I “enjoyed” writing new queries and modifying existing ones each time a new design with UI changes is handed to me.

Container queries are the right answer for me. Now I can scope child elements to a parent container and rely on the container’s size for defining where the layout shifts without paying any mind to other surrounding components.

The other thing I like about container queries is that they feel very CSS-y. Defining a container directly on a selector matches a natural property-value syntax and helps me avoid having to figure out math upfront to determine breakpoints.

.parent {
  container-type: inline-size;
}

@container (min-width: 600px) {
  .child {
    align-self: center;
  }
}

I still use media queries for responsive layouts but tend to reserve them for “bigger” layouts that are made up of assembled containers. Breakpoints are more predictable (and can actually more explicitly target specific devices) when there’s no need to consider what is happening inside each individual container.

Learn About Container Queries

Grouping Styles In Layers

I love this way of managing the cascade! Now, if I have a reset or some third-party CSS from a framework or whatever, I can wrap those in a cascade layer and chuck them at the bottom of a file so my own styles are front and center.

I have yet to ship anything using cascade layers, but I now reach for them for nearly every CodePen demo I make. The browser support is there, so that’s no issue. It’s more that I still rely on Sass on projects for certain affordances, and maintaining styles in partialized files still feels nice to me, at least for that sort of work.

But in an isolated demo where all my styles are in one place, like CodePen? Yeah, all the cascade layers, please! Well, all I really need is one layer for the base styles since un-layered styles have higher specificity than layered ones. That leaves my demo-specific styles clean, uncluttered, and still able to override the base at the top, which makes it way more convenient to access them.

body {
  display: grid;
  gap: 3rem;
  place-items: center;
}

@layer base {
  body {
    font-size: 1.25rem;
    line-height: 1.35;
    padding: 3rem;
  }
}

Learn More About Cascade Layers

:is() And :where()

I definitely reach for these newer relational pseudo-selectors, but not really for the benefits of selecting elements conditionally based on relationships.

Instead, I use them most often for managing specificity. But unlike cascade layers, I actually use these in production.

Why? Because with :is(), specificity is determined not by the main selector but by the most specific selector in its argument list.

/* Specificity: 0 1 0 */
:is(ol, .list, ul) li {}

/* Specificity: 0 0 2 */
ol li {}

The .list selector gives the first ruleset a higher specificity score meaning it “beats” the second ruleset even though the first ruleset is higher in the cascade.

On the flip side, the specificity of :where() is a big ol’ score of zero, so it does not add to the overall score of whatever selector it’s on. It simply doesn’t matter at all what’s in its argument list. For the same reason I use :is() to add specificity, I use :where() to strip it out. I love keeping specificity generally low because I still want the cascade to operate with as little friction as possible, and :where() makes that possible, especially for defining global styles.

A perfect example is wrapping :not() inside :where() to prevent :not() from bumping up specificity:

/* Specificity: 0 0 0 */
:where(:not(.some-element)) {}

Taken together, :is() and :where() not only help manage specificity but also take some cognitive load from “naming” things.

I’m one of those folks who still love the BEM syntax. But naming is one of the hardest things about it. I often find myself running out of names that help describe the function of an element and its relationship to elements around it. The specificity-wrangling powers of :is() and :where() means I can rely less on elaborate class names and more on element selectors instead.

Learn More About :is() And :where()

The New Color Function Syntax

The updated syntax for color functions like rgb() and hsl() (and the evolving oklch() and oklab()) isn’t the sort of attention-grabbing headline that leads to oo’s and aw’s, but it sure does make it a lot better to define color values.

For one, I never have to reach for rgba() or hsla() when I need an alpha value. In fact, I always used those whether or not I needed alpha because I didn’t want to bother deciding which version to use.

color: hsl(50deg, 100%, 50%);

/* Same */
color: hsla(50deg, 100%, 50% / 1)

Yes, writing the extra a, /, and 1 was worth the cost of not having to think about which function to use.

But the updated color syntax is like a honey badger: it just doesn’t care. It doesn’t care about the extra a in the function name. It doesn’t even care about commas.

color: hsl(50deg 100% 50% / .5);

So, yeah. That’s definitely changed the way I write colors in CSS.

What I’m really excited to start using is the newer oklch() and oklab() color spaces now that they have full browser support!

Learn More About CSS Color 4 Features

Sniffing Out User Preferences

I think a lot of us were pretty stoked when we got media queries that respect a user’s display preferences, the key one being the user’s preferred color scheme for quickly creating dark and light interfaces.

:root {
  --bg-color: hsl(0deg 0% 100%);
  --text-color: hsl(0deg 0% 0%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: hsl(0deg 0% 0%);
    --text-color: hsl(0deg 0% 100%);
  }
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

But it’s the prefers-reduced-motion query that has changed my CSS the most. It’s the first thing I think about any time a project involves CSS animations and transitions. I love the idea that a reduced motion preference doesn’t mean nuking all animation, so I’ll often use prefers-reduced-motion to slow everything down when that’s the preference. That means I have something like this (usually in a cascade layer for base styles):

@layer base {
  :root {
    --anim-duration: 1s;
  }

  /* Reduced motion by default */
  body {
    animation-duration: --anim-duration;
    transition: --anim-duration;
  }

  /* Opt into increased motion */
  @media screen and (prefers-reduced-motion: no-preference) {
    body {
      --anim-duration: .25s;
    }
  }
}

Learn More About User Preference Queries

Defining Color Palettes

I’ve used variables for defining and assigning colors ever since I adopted Sass and was thrilled when CSS custom properties came. I’d give generic names to the colors in a palette before passing them into variables with more functional names.

/* Color Palette */
--red: #ff0000;
/* etc. */

/* Brand Colors */
--color-primary: var(--red);
/* etc. */

I still do this, but now I will abstract things even further using color functions on projects with big palettes:

:root {
  /* Primary Color HSL */
  --h: 21deg;
  --s: 100%;
  --l: 50%;

  --color-primary: hsl(var(--h) var(--s) var(--l) / 1);
}

.bg-color {
  background: var(--color-primary);
}

.bg-color--secondary {
  --h: 56deg;
  background: hsl(var(--h) var(--s) var(--l) / 1);
}

A little too abstract? Maybe. But for those projects where you might have ten different varieties of red, orange, yellow, and so on, it’s nice to have this level of fine-grained control to manipulate them. Perhaps there is more control with color-mix() that I just haven’t explored yet.

Learn More About Defining Color Palettes

What I’m Not Using

Huh, I guess I am writing CSS a bit differently than I used to! It just doesn’t feel like it, but that probably has to do with the fact that there are so many other new features I am not currently using. The number of new features I am using is much, much lower than the number of features I have yet to pick up, whether it’s because of browser support or because I just haven’t gotten to it yet.

CSS Nesting

I’m really looking forward to this because it just might be the tipping point where I completely drop Sass for vanilla CSS. It’s waiting for Firefox to support it at the time of this writing, so it could be right around the corner.

Style Queries

I’ve made no secret that applying styles to elements based on the styles of other elements is something that I’m really interested in. That might be more of an academic interest because specific use cases for style queries elude me. Maybe that will change as they gain browser support, and we see a lot more blog posts where smart folks experiment with them.

:has()

I’ll definitely use this when Firefox supports it. Until then, I’ve merely tinkered with it and have enjoyed how others have been experimenting with it. Without full support, though, it hasn’t changed the way I write CSS. I expect that it will, though, because how can having the ability to select a parent element based on the child it contains be a bad thing, right?

Dynamic Viewport Units

I’ve started sprinkling these in my styles since they gained wide support at the end of 2022. Like style queries, I only see limited use cases — most notably when setting elements to full height on a mobile device. So, instead of using height: 100vh, I’m starting to write height: 100dvh more and more. I guess that has influenced how I write CSS, even if it’s subtle.

Media Query Range Syntax

Honestly, I just haven’t thought much about the fact that there’s a nicer way to write responsive media queries on the viewport. I’m aware of it but haven’t made it a part of my everyday CSS for no other reason than ignorance.

OKLCH/OKLAB Color Spaces

oklch() will most definitely be my go-to color function. It gained wide support in March of this year, so I’ve only had a couple of months and no projects to use it. But given the time, I expect it will be the most widely used way to define colors in my CSS.

The only issue with it, I see, is that oklch() is incompatible with another color feature I’m excited about...

color()

It’s widely supported now, as of May 2023! That’s just too new to make its way into my everyday CSS, but you can bet that it will. The ability to tap into any color space — be it sRGB, Display P3, or Rec2020 — is just so much nicer than having to reach for a specific color function, at least for colors in a color space with RGB channels (that’s why color() is incompatible with oklch() and other non-RGB color spaces).

--primary-color: color(display-p3 1 0.4 0);

I’m not in love with RGB values because they’re tough to understand, unlike, say, HSL. I’m sure I’ll still use oklch() or hsl() in most cases for that very reason. It’s a bummer we can’t do something like this:

/* 👎 */
--primary-color: color(oklch 70% 0.222 41.29);

We have to do this instead:

/* 👍 */
--primary-color: oklch(70% 0.222 41.29);

The confusing thing about that is it’s not like Display P3 has its own function like OKLCH:

/* 👎 */
--primary-color: display-p3(1 0.434 0.088);

We’re forced to use color() to tap into Display P3. That’s at odds with OKLCH/OKLAB, where we’re forced to reach for those specific functions.

Maybe one day we’ll have a global color() function that supports them all! Until then, my CSS will use both color() and specific functions like oklch() and decide which is best for whatever I’m working on.

I’ll also toss color-mix() in this bucket, as it gained full support at the same time as color(). It’s not something I write regularly yet, but I’ll certainly play with it, likely for creating color palettes.

Honorable Mentions

It would be quite a feat to comment on every single new CSS feature that has shipped over the past five or so years. The main theme when it comes to which features I am not using in my day-to-day work is that they are simply too new or they lack browser support. That doesn’t mean I won’t use them (I likely will!), but for the time being, I’m merely keeping a side-eye on them or simply having a fun time dabbling in them.

Those include:

  • Trigonometric functions,
  • Anchor position,
  • Scroll-linked animations,
  • initial-letter,
  • <selectmenu> and <popover>,
  • View transitions,
  • Scoped Styles.

What about you? You must be writing CSS differently now than you were five years ago, right? Are you handling the cascade differently? Do you write more vanilla CSS than reaching for a preprocessor? How about typography, like managing line heights and scale? Tell me — or better yet, show me — how you’re CSS-ing these days.

How to Restrict Content on WordPress to Patreon Members

Do you want to restrict content on WordPress to Patreon members?

By adding patron-only content to your website, you can encourage visitors to join your Patreon and increase your profits. It’s also a great way to get Patreon users to visit your website, which will boost your traffic and can increase revenue further.

In this article, we will show you how to restrict content on WordPress to Patreon members.

How to restrict content on WordPress to Patreon members

Why Restrict Content on WordPress to Patreon Members?

If you are a content creator, then you may want to earn money from your writing, music, podcasts, stock photos, and other content.

Patreon allows you to sell memberships and then give those people access to different content based on their subscriptions.

Patreon is also a great way to build relationships with your fans. For example, you can automatically send a welcome note to new patrons.

An example of a custom Patreon welcome note

You can also create private Discord servers or chat rooms where members can talk to each other and even message you directly.

After creating a Patreon, it’s a good idea to publish members-only content to your WordPress website. This encourages visitors to join your Patreon in order to unlock exclusive WordPress content.

This can also increase your blog traffic since patrons will need to visit your WordPress site to see the exclusive content.

That said, let’s see how you can restrict content on WordPress to Patreon members.

How to Create a Patreon Account for Your WordPress Website

If you don’t already have an account, then head over to the Patreon website and click on the ‘Create on Patreon’ button.

Creating a Patreon account for your fans

You can now type in your email address and create a password. If you prefer, then you can also register using your existing Google or Facebook login.

After entering this information, the setup wizard will ask some questions about how you plan to use Patreon. Simply follow the onscreen instructions to build an engaging and informative Patreon page.

With that done, you can use the Patreon tools to customize your page, add membership tiers, set up billing, and more.

How to create a Patreon page using the built-in tools

When you are happy with how your Patreon page looks, you are ready to add it to your WordPress website.

How to Connect WordPress to Your Patreon Account

The easiest way to create Patreon-only content is by using Patron Plugin Pro. This plugin allows you to restrict access to individual pages and posts or even lock all the content from a specific tag or category.

You can also automatically lock and unlock content based on a schedule. This allows you to create free trials, automatically drip content, and more.

First, you will need to install and activate Patron Plugin Pro. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, you will need to connect the plugin to your Patreon account. To do this, go to Patreon Settings » Patreon Settings, and then click on ‘Connect site’.

Connecting your Patreon account to WordPress

When you are ready, select ‘Start connection wizard’.

On the next screen, you need to click on ‘Let’s start!’

Connecting a WordPress website to Patreon

To connect Patreon to your WordPress website, you will need to create an OAuth client.

If you are happy to do this, then click on ‘Allow’.

How to connect Patreon and WordPress using an OAuth client

If prompted, type in the login information for your Patreon account.

After a few moments, Patron Plugin Pro will take you back to the main WordPress dashboard. Your Patreon account is now connected to WordPress.

Before you restrict any content, it’s a good idea to look at the plugin’s settings by going to Patreon Settings » Patron Settings.

The Patron Plugin Pro plugin from CodeBard

The default settings should work well for most websites, but it’s still worth checking whether you need to make any changes.

If you do customize the settings, then scroll to the bottom of the screen and click on the ‘Update Settings’ button.

Updating your Patreon settings using the Patron Pro Plugin

How to Restrict Content to Patreon Members

The easiest way to create patron-only content is by restricting access to entire content types, categories, or tags. For example, you might lock all content that has the ‘Patreon’ tag.

To do this, simply select ‘Patreon Plugin Pro’ from the left-hand menu and then click on the ‘Content Locking’ tab.

Restricting content in WordPress to Patreon members

Here, you must click to expand the ‘Make post types Patron only’ section.

To start, open the ‘Select Post Type’ dropdown and choose the content you want to restrict, such as page, post, media, or some other content type.

Restricting content categories to Patreon members

Then, open the new ‘All’ dropdown and choose whether you want to restrict this content type based on format or categories and tags.

Depending on your selection, you will get access to some additional settings. For example, if you select ‘Tag’, then you will need to choose the tag you want to make Patreon-only.

Restricting tags to Patreon members in WordPress

Finally, open the ‘Select how to lock’ dropdown and choose how you want to lock and unlock the content.

The easiest option is ‘Lock all posts of this type’. However, you can also lock the most recent example of this content and use the older content as a preview for non-members.

You can also unlock or lock content after a certain number of days has passed. This allows you to offer exclusive early access to Patreon members.

Similarly, you can use this feature to create a free trial. For example, you might make your latest online course available to non-patrons for the first 24 hours. This can create a buzz around the launch while also encouraging people to join your Patreon so that they don’t lose access after 24 hours.

Based on your selection, you will see some additional options.

Locking your WordPress content using an automated delay

Most importantly, you will need to enter a minimum $ value membership tier.

This should be linked to the cost of your memberships. For example, if your Silver tier is $5, then typing ‘$5’ will unlock this content for everyone with a Silver or higher membership.

Setting a fee for restricted content in WordPress

When you are happy with how the content locking is set up, click on ‘Add post type to gating.’

To lock more content, simply follow the same process described above. When you have finished, don’t forget to scroll to the bottom of the screen and click on ‘Save.’

How to Restrict Specific Pages and Posts to Patreon Members

Another option is to mark individual pages and posts as Patreon-exclusive. This allows you to control exactly what content your patrons have access to.

To start, simply open the page or post in the WordPress content editor.

Next, you will need to set some rules about who can access this content. In the right-hand menu, scroll to the ‘Patreon Level’ section and choose from the dropdown menu.

You can either select a Patreon level or choose ‘Any Patreon’. For example, you might select ‘Any Patreon’ if this is entry-level content that all members should have access to or if you have only created a single Patreon tier.

Restricting content based on Patreon levels in the WordPress post and page editor

Often, you will want to give new patrons access to your entire back catalog of members-only content. Another option is to restrict access to people who were already patrons when the content was published.

This is useful for creating time-sensitive Patreon promotions, such as exclusive holiday content or a ‘limited edition’ video.

To add this restriction, find the ‘Require a pledge active at the time….’ section and check its ‘Yes’ box.

Requiring an active Patreon pledge

Another option is to show or lock the content automatically based on a schedule. This is perfect for offering exclusive early access to Patreon members.

To lock and unlock content automatically, find the ‘Advanced Locking’ section. Here, open the dropdown that shows ‘No change’ by default and choose an option from the list.

Patreon's advanced content locking settings

You can then use the new settings to configure the automatic locking and unlocking.

By default, the plugin will show the following message to all non-Patreon members: ‘To view this content, you must be a member of (name) content at (cost) or more.’

Showing a message to non-patron visitors

You may want to add your own message for non-Patreon members. For example, you might say why the content is restricted or why they should buy a Patreon subscription.

To add a message, scroll to the ‘Custom Patron-Only Banner’ section and click on the ‘Non-Patrons Only’ button.

Creating a custom message for Patreon members

This adds some opening and closing tags to the small text editor.

Simply type your message in between these tags. You can also add links, formatting, and more in exactly the same way you create content in the WordPress page or post editor.

Advertising Patreon on your WordPress website

When you are happy with the settings, simply click on the ‘Publish’ or ‘Update’ button.

If you visit this content while logged into your admin account, then you won’t see any changes. However, if you visit it in an incognito browser tab, then you will see the content restriction in action.

Viewing restricted content as a non-Patron member

How to Add a Patreon Button to Your WordPress Posts

Adding Patreon-exclusive content to your WordPress blog is a great start. However, it’s also a good idea to promote your Patreon on other areas of your website. This will help turn visitors into paying patrons.

Patron Plugin Pro can automatically add a ‘Become a Patron’ button to all your posts. Visitors can simply click this button to visit your Patreon page.

Adding a Patreon button to any WordPress post

To start, select ‘Patron Plugin Pro’ from the left-hand menu, then select the ‘Quickstart’ tab.

Since we already connected the plugin to Patreon, you should see your account in the ‘Site’s Patreon user’ field.

CodeBard's Patron Plugin Pro settings

If you don’t see the right URL, then you can add it now.

After that, you are ready to configure how the call to action button acts.

By default, the plugin opens your Patreon page in the same tab. This takes visitors away from your WordPress website, so we recommend opening the link in a new tab instead.

To do this, select ‘Yes’ under ‘Open pages in new window’.

How to open a Patreon link in a new tab on your WordPress website

The plugin adds the standard Patreon button to your website by default. This helps visitors recognize the button and understand that you have a Patreon page.

If you prefer, then you customize the button with your own branding using the settings under ‘Use a custom button’. When you are happy with the changes you’ve made, don’t forget to click on ‘Save’.

Next, click on the ‘Post Button’ tab to change how the button looks.

Customizing the Patreon button on your WordPress blog or website

By default, the button includes the following heading: ‘Liked it? Take a second to support {authorname} on Patreon!’

To replace this with your own messaging, simply go ahead and type into the ‘Message over Buttons in Posts’ field.

Customizing the message above a Patreon button

You can also change the message’s alignment, adjust its size, and add margins.

If you want to remove the message instead, then find the ‘Show a message over Buttons in Posts’ section. Here, simply click the ‘No’ button.

Removing the custom message from a Patreon button in WordPress

If you make any changes, then don’t forget to click on ‘Save’.

Now, you can visit any post on your website to see the Patreon button live.

How to Add a Patreon Button to the WordPress Sidebar

If you prefer, then you can remove the Patreon button from your blog posts and add it to the sidebar or similar section instead.

In this way, you can show the button on other areas of your website, such as the product pages in your online store.

To start, you will want to remove the button from your WordPress posts so that you don’t show multiple Patreon buttons on the same page.

To do this, select the ‘Post Button’ tab and find the ‘Show Button under Posts’ section. Here, go ahead and select the ‘No’ button.

Adding a Patreon button to your WordPess website using the CodeBard plugin

With that done, click on ‘Save’.

Next, click on the ‘Sidebar Widgets’ tab. Here, you can customize the message that appears next to the button, including changing the font size and adding margins.

Adding a Patreon button to the WordPress sidebar

If you do make any changes, then don’t forget to click on the ‘Save’ button.

With that setup done, you can add the Patreon button to any widget-ready area by going to Appearance » Widgets. Here, click on the blue ‘+’ button.

Adding a Patreon block to any widget-ready area of your WordPress theme

Note: If you are using a block WordPress theme, then you will need to go to Appearance » Editor instead.

In the panel that appears, start typing in ‘Patreon Sidebar Site Widget’.

When the right block appears, drag and drop it onto the area where you want to show the Patreon button.

Promoting your Patreon to the people who visit your website

You can now type an optional title into the ‘Title’ field.

This will appear above the Patreon button in the theme’s sidebar or similar section.

Adding a title to a Patreon button WordPress

With that done, click on ‘Update’.

Now if you visit your WordPress blog or website, you will see the Patreon button in the widget-ready area.

An example of a Patreon button, on a WordPress website

Bonus: How to Create a Patreon Alternative Using WordPress

Patreon has helped countless creators monetize their content and make money online, but the platform also takes a significant cut of your earnings.

Depending on your Patreon plan, you will lose between 5%-12% of everything you earn on Patreon, plus payment processing and payout fees.

Depending on your location, you may also have to pay additional fees, including Value-added tax, Goods and services tax, Québec sales tax (QST), and US Sales tax.

All of this can really add up.

You will also need to follow all of Patreon’s terms and conditions and other guidelines. If you break any rules, then Patreon will censor your content and may even delete your account. If this happens, then paying members will lose access to your content, which reflects badly on your brand and can damage your reputation.

With that being said, many WordPress website owners are looking for a Patreon alternative.

That’s where MemberPress comes in.

The MemberPress membership plugin

MemberPress is the best membership plugin for WordPress.

It allows you to create unlimited membership levels for your WordPress website and then restrict access to your content based on the person’s membership level.

Membership tiers, in the MemberPress WordPress plugin

In this way, you can create members-only videos, eBooks, blog posts, online courses, downloadable files, and more.

You can even assign different content to different membership levels, which encourages members to upgrade their subscriptions.

Different membership levels on a WordPress members website

This is exactly how the Patreon tier model works, without any of the extra transaction fees. Since MemberPress doesn’t take a cut of your earnings, you get to keep more of the money you make.

For more on this topic, please see our detailed guide on how much it costs to start a membership site.

With MemberPress, you also have the freedom to create your own privacy policy, rules, and terms and conditions. This gives you more flexibility to create unique and engaging content for your fans, which will make it easier to grow your business.

To help you get started, we have created an ultimate guide to building a WordPress membership site using MemberPress.

We hope this article helped you learn how to restrict content on WordPress to Patreon members. You may also want to read our guide to the best social media plugins for WordPress to grow your online following and learn how to run a giveaway/contest in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Restrict Content on WordPress to Patreon Members first appeared on WPBeginner.

Copy pivotcharts from Excel to word document using python pi

I have excel sheet where all pivotcharts are combined by slicers. i want to copy individual pivot charts from the excel sheet to a word document by image to placeholder

Thank you in advance

I have tried with win32 & openpyxl but error message came
Object attribute charts is not found