Partials are an often overlooked feature in Memberium used to help you manage your content.
Partials are chunks of content that can be included into multiple places on your site. They don’t have their own URL and don’t show up in menus or searches. You insert a partial by using a shortcode on another page or post. You can include partials anywhere that shortcodes can be processed.
Partials vs. Custom Shortcodes
Partials differ from Custom shortcodes in two important respects. Partials do not have their own individual shortcodes to insert them into the page. They all share a single shortcode. Because Partials don’t have their own individual shortcodes, they are lighter on the system then custom shortcodes. Partials can include other partials, or shortcodes, but they cannot dynamically render using attributes. Partials can be access controlled using tags and membership levels, like a regular page or post so they can be easily conditional.
Whether or not a partials is displayed is based on the content access controls you assign to the partial. You can configure Partials that a visitor does not have access to, to be hidden or to display an excerpt.
Common Uses of Partials
Partials are a simple but very useful tool in your membership tool belt. Here’s some of the things you can do with them:
- Re-use the same content in multiple locations throughout your site that can be updated in one place.
- Conditionally display a section of content on the page
- Break a long piece of complex HTML or page content into manageable pieces
- Embed complex HTML or shortcode content for use in a theme or plugin widget with HTML restrictions.
Some examples of displaying conditional content on the page would include but are not limited to:
- Deliver visitor-specific content within a particular page, for example a welcome video for new members
- Featured site content
- Displaying targeted ads to for additional access and upgrade offers
- Display targeted partner ads to customers / members