Network Template Parts

Network Template Parts

Wordpress plugin

Install on Wordpress

App Details

When managing a brand across many sites, it is often necessary to ship changes to the look and feel with the certainty that they will be applied immediately.

In its current iteration, the WordPress site editor allows individual site administrators to make changes to a theme’s templates and template parts. Once a template or a template part has been edited on an individual site, it no longer receives updates from the theme automatically, which may in turn cause unintended consequences.

This plugin provides a way for site administrators to edit parts of the site without accidentally overwriting pieces that should remain consistent.

Network Template Parts works in tandem with Restrict Network Templates, which restricts the editing of templates on individual sites.

Assumptions

Templates provided by the theme should not be edited.

A theme’s core structure is defined by templates. (e.g. templates/home.html)

It should be possible to set a structure in these templates and assume that they will not be overridden on individual sites.

Network-level template parts are managed by network administrators.

Parts of a theme’s structure rely on data from the main site on a network. (e.g. global navigation)

It should be possible for a template to specify that a section of a page is rendered in the context of the main site.

Site-level template parts are managed by site administrators.

Parts of a theme’s structure rely on data from individual sites on a network. (e.g. site navigation, content)

It should be possible to override site-level template parts from an individual site.

Block

The Network Template Part block renders a selected template part in either a “site” or “network” context.

Attributes:

  • slug determines which template part to load. Template parts are located in a theme’s parts/ directory.
  • context determines the context in which the part should render.

Examples

Often, a network will provide common header and footer areas while leaving the site content between to site administrators. With Network Template Parts, this can be accomplished as so:

A templates/index.html file may contain:

<!-- wp:ntp/network-template-part {"slug":"header","context":"network"} /--> <!-- wp:ntp/network-template-part {"slug":"main-index","context":"site"} /--> <!-- wp:ntp/network-template-part {"slug":"footer","context":"network"} /--> 

>

This loads parts/header.html from the main site on the network, parts/main-index.html from the current site, and parts/footer.html from the main site on the network.

The parts/header.html file main contain:

<!-- wp:ntp/network-template-part {"slug":"header-top","context":"network"} /--> <!-- wp:ntp/network-template-part {"slug":"header-main","context":"network"} /--> 

>

This defines two areas in the header to be managed at the network level. The parts/header-main.html may contain something like:

<!-- wp:group --> <div class="wp-block-group"> <!-- wp:group {"tagName":"header"} --> <header class="wp-block-group"> <!-- wp:ntp/network-template-part {"slug":"header-main-network-logo","context":"network"} /--> <!-- wp:ntp/network-template-part {"slug":"header-main-site-navigation","context":"site"} /--> </header> <!-- /wp:group --> </div> <!-- /wp:group --> 

>

This provides some common HTML structure, loads a network-level logo, and also provides a site-level navigation in parts/header-main-site-navigation.html.

Now, an individual site administrator can make changes to a navigation menu while also receiving updates from the theme and the network if the look and feel of the broader network changes.

Pricing

Starting from $0 per month.

Check Out the Countdown Bar Widget

By Common Ninja

Countdown BarTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

multisite
site editor
templates

Developed By

Happy Prime

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Maps

Maps plugins for Wordpress

Translation

Translation plugins for Wordpress

Chat

Chat plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Contact

Contact plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Forms

Forms plugins for Wordpress

Comments

Comments plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Comments

Comments plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Video Player

Video Player plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Security

Security plugins for Wordpress

Ads

Ads plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Membership

Membership plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Countdown Bar for Wordpress logo

Countdown Bar

Add a countdown bar to your site to create urgency, highlight limited time offers, and drive faster engagement and higher conversions.

Carousel Grid for Wordpress logo

Carousel Grid

Display multiple image carousels together in one organized grid layout.

Bluesky Feed Slider for Wordpress logo

Bluesky Feed Slider

Show Bluesky posts with a Bluesky feed slider that scrolls updates and keeps content visible while keeping visitors engaged.

Coupon Bar for Wordpress logo

Coupon Bar

Display discounts with a coupon bar that highlights special offers, drives urgency, and helps convert visitors into paying customers.

Email Subscription Form for Wordpress logo

Email Subscription Form

Capture email leads with an email subscription form that collects addresses, saves entries, sends notifications, and helps grow your audience.

Company Branch List for Wordpress logo

Company Branch List

Present all your locations with a clear company branch list that helps customers find nearby offices, understand key details, and enjoy a smoother experience.

TDEE Calculator for Wordpress logo

TDEE Calculator

Create a TDEE Calculator that helps visitors estimate daily calorie needs and make informed decisions.

Feature Voting for Wordpress logo

Feature Voting

Use feature voting so users submit ideas, vote on requests, and help you prioritize product updates by real customer demand.

Support Form for Wordpress logo

Support Form

Use a support form that lets customers submit tickets, saves each request, sends notifications, and helps you manage support more efficiently.

Facebook Feed for Wordpress logo

Facebook Feed

Show Facebook posts in a live Facebook feed that keeps content fresh, boosts social proof, and helps visitors engage more with your brand.

News Ticker for Wordpress logo

News Ticker

Use a news ticker to display headlines and updates that highlight key information and keep users informed in real time.

Stories for Wordpress logo

Stories

Add interactive stories to your site to showcase content in a visual, mobile-friendly format that boosts engagement and guides visitors toward action.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms