Can't use Wordpress Page Break Inside S2If

Awesome plugin!

For some reason it does not work if you have a page break inside an S2If block.

I have page breaks for non paying subscribers, since I get more ad impressions and, since there’s ads, the pages also get shorter (each).

I’d like to be able to present a different layout for paying subscribers, though, with everything on each post on a single page, but everytime I try it won’t work, wordpress will break the post into multiple pages and show the [/S2IF] as text on the next page.

Is there a way to create a page break block that only works if the conditional is met or, even better, to make the conditionals work even when there’s a page break inside of them, so we can hide entire segments of our posts that might have page breaks inside of them?

What are you referring to as a “Page Break”. There are no page breaks in HTML.

1 Like

Wordpress page breaks. It’s a wordpress layout block that breaks your content into multiple pages, so people have to navigate to continue reading, meaning you get more page loads and ad impressions for a single post, or you can break long wordpress posts into smaller parts when necessary as well.

It sounds like you are using the Gutenberg editor…so your page is block-based…correct?

S2Member was designed before block editors. Wrap blocks with S2 shortcodes at your peril :slight_smile:

1 Like

Yes, I am using Gutenberg.

S2Member works wonderfully with regular html (including header/footer) and most blocks, but because page breaks (weren’t page breaks available before Gutenberg?) split the code into 2 different HTML pages the plugin can’t seem to process it and wordpress’s page break block is taking precedence.

I thought that perhaps someone knew how to work around this limitation. :innocent:

WordPress Gutenberg is a REACT-based editor. A lot of its functionality involves Javascript manipulations of the DOM.

In general, it is unlikely that you could block-wrap using S2Member unless they are simple HTML-centric blocks.

As I said…wrap blocks with S2 shortcodes at your peril :slight_smile:

S2Member would need some re-coding to be able to content-protect blocks.

1 Like

Sorry to hear. Thanks a lot for your prompt reply :sparkling_heart:

I guess my premium users will have to keep up with page breaks for now :wink:

I am very happy I got to remove the ads for them using the plugin, though.

My next step is trying to use the plugin to send CURL commands to OneDrive, so I can have s2Member control my shared folders. It will be fantastic if/when I can make it work :slight_smile:

Sounds interesting :slight_smile:

1 Like

Yes! It’s really awesome to be able to use this at no cost when you’re a micro publisher that only makes a couple of dollars here and there :innocent:

Thanks again!