Rebel Insights

How to Add a Title to Section and Tag Pages

How to Add a Title to Section and Tag Pages

Sometimes you might find the need to put a title on a section page. Here's an example:

Here's how to do it:


First, navigate to the section or tag page you want to modify.

Then, simply add "{{subpage.title}}" to the page as shown here:

     <div class="subpage_title">{{subpage.title}}</div>

Adding that div tag to the page enables the title of the section page to display. To add a div tag, use the Custom HTML element in the Layout & Design tool:

You can also use Jinja code within the Layout and Design tool so it is even easier to add sections: Tag Page

You might need to do the same thing for the Tag Page as shown here:

To do this, JavaScript is required. Here's a code example:

    <script type="text/javascript">
    var segment_str = window.location.pathname;
    segment_str=segment_str.replace(/\/+$/, "");
    var segment_array = segment_str.split( '/' );
    var last_segment = segment_array[segment_array.length - 1];
    last_segment = last_segment .split('-').join(' ');
    document.querySelector('.top-tag-title').innerHTML=last_segment;
    </script>

Where there's a Custom HTML element present — such as <div class="top-tag-title"></div> — this will be the position of the heading. This applies to styling as well.

If you have any questions about how to implement this, email support@rebelmouse.com.

What Is RebelMouse?
Request a Proposal
subscription model for publishers
Rebel Insights

In 2023, Publishers Take Back Control With Subscription Success

Users are ready to pay for content that delivers

The Rise of the Mature User

It's been a long and winding path, but in 2023 the subscription model continues its upward trajectory as a top revenue strategy for publishers of all sizes. The tug of war between platforms and publishers reached its peak in the last few years of the previous decade, leaving users desperate for a modern user experience that's clear of any clutter from the duopoly that is Google and Facebook. This is why intelligent paywall models are a top choice for users looking to consume content right from the source. When done correctly, the strategy can work for any type of media. The New York Times, a frequent showpiece example of the power of paywalls, is constantly reporting record-busting subscription numbers, with 7.6 million digital subscriptions in 2021.

And it all makes perfect sense. The subscription model eliminates the middleman — such as the platforms — so readers get the experience and content they want, and publishers get the cash they need.

Keep reading...Show less
The Most Secure CMS of 2023
Featured

The Most Secure CMS of 2023

Why RebelMouse Is the Most Secure CMS on the Web

Delivering a secure, high-performing environment with extreme reliability is essential to all of our clients at RebelMouse. We only use industry-leading, reliable approaches to host our infrastructure. This ensures maximum stability and security for all of our clients’ data. Here are just some of the reasons we’re able to maintain a hard-bodied product that’s flexible, too.

Keep reading...Show less
Interested in a Free Website Health Check?Check Your
Website's Health
Get Your Free Analysis Now