Content Sectioner

Content Sectioner

Wordpress plugin

Install on Wordpress

App Details

Most modern websites have pages that break the content into multiple sections, with changing background colors and graphics marking the breaks between sections. In order for a page to be broken into sections, typically there needs to be additional markup within the HTML (ie. div tags) that can be targeted in the stylesheet for formatting. However, most content authors don’t want to think about techie stuff like div tags, and prefer to work in the Visual editor which only provides for semantic markup (“Paragraph”, “Heading 1”, etc.).

Content Sectioner takes advantage of WordPress’s content filtering mechanism and makes it easy for a theme developer to insert the necessary sectioning markup auto-magically while allowing content authors to still work as they prefer. It looks for specified landmarks within the content (such as h3 tags) and performs the necessary code insertions or replacements. It does this using a concise and easy-to-use notation, relieving the theme developer from having to write (often repetitive) regular expressions and string manipulation.

A concrete example

Suppose you’re working on a site and you want the About page (with slug about) to have an inset in the middle of it with a blue background setting it apart. The inset should contain the first occurence of a “Heading 3” and all the paragraphs up until just before the next “Heading 2”. The stylesheet will apply the changing background to elements with the selector .inset.

Assuming your index.php file contains something like this:

<?php $current_slug = get_queried_object()->post_name; get_template_part('content', $current_slug); ?> 

Then in the file content-about.php, you can set up the Content Sectioner like so:

<?php $sectioner = new ContentSectioner(); $sectioner->replace_first( array( 'open_tag' => 'h3', 'open_insert' => '<div class="inset">', 'open_policy' => 'before', 'close_tag' => 'h2', 'close_insert' => '</div>', 'close_policy' => 'before' ) ); // Do the usual Loop thing here... ?> 

The About page (and only the About page) will have this inset section inserted.

You can provide replacement rules that replace/insert at the first occurrence of a match, the next occurrence, all remaining occurrences, or all occurrences in the entire piece of content. You can place the inserted HTML before or after a match, or replace the match. Also, you can match a closing tag by simply providing the preceding slash character (eg. ‘/h2’). Tag matches will match against any variant of a tag (upper or lowercase, with or without attributes, as an opening tag or as a self-closing tag like <hr />). In the rare case that something other than a tag needs to be matched, you can supply a raw regex instead of a tag.

Providing instructions

As the theme developer, you likely would want to let the content authors know that this magic insertion of sections will occur, and what landmarks need to be present in their content to trigger the sectioning.

In some file in your theme that gets loaded for every page (most likely functions.php), you can provide such instructions along with the slug for the page to which the instructions apply. The instructions will appear at the top of the Edit Page page in the admin.

ContentSectioner::provide_instructions('about', " A blue background will be placed behind everything starting at the first Heading 3 through just before the next Heading 2."); 

Full User Guide

For full documentation and more sample use cases, visit the Content Sectioner homepage.

Pricing

Starting from $0 per month.

Check Out the Messenger Chat Widget

By Common Ninja

Messenger ChatTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

Content Formatting
developer

Developed By

Kirk Bowers

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.

Messenger Chat for Wordpress logo

Messenger Chat

Add Messenger Chat to your site to communicate with visitors, offer fast support, and create a smoother user experience across all pages.

Airbnb Reviews for Wordpress logo

Airbnb Reviews

Show Airbnb reviews to build trust, improve credibility, and help visitors make confident booking decisions that support higher property sales.

Feedback Popup for Wordpress logo

Feedback Popup

Collect user insights with a feedback popup that reveals issues early, improves user experience, and captures valuable leads through a clear feedback form.

Personality Quiz for Wordpress logo

Personality Quiz

Create interactive personality quizzes with custom results and flexible design to boost engagement and help visitors explore tailored outcomes easily.

HIPAA Compliance Forms for Wordpress logo

HIPAA Compliance Forms

Create secure HIPAA compliant forms that protect sensitive data, offer full customization, and integrate easily for safe medical information collection.

PDF Viewer for Wordpress logo

PDF Viewer

Add a PDF viewer to your site to display documents, share product information, and give visitors easy access to helpful content in one place.

Countdown to Download for Wordpress logo

Countdown to Download

Use a countdown to download widget that reveals files after the timer ends, builds anticipation, and guides visitors toward higher engagement.

Course Listings for Wordpress logo

Course Listings

Create course listings with a course catalog widget that displays programs clearly, supports easy organization, and helps visitors explore courses effectively.

What's New Popup for Wordpress logo

What's New Popup

Show product updates, new features, and announcements in a What's New popup that keeps users informed and engaged.

Social Share Buttons for Wordpress logo

Social Share Buttons

Add social share buttons so visitors share content to major networks, boost engagement, and drive more referral traffic.

Interactive Maps for Wordpress logo

Interactive Maps

Create interactive maps with color coding and tooltips to visualize data clearly and embed engaging maps on your site.

Skill List for Wordpress logo

Skill List

Showcase your abilities with a structured skill list that highlights strengths clearly, builds credibility, and improves your chances of getting hired.

More plugins

plugins You Might Like

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