studiohyperset / wordpress-pagination-plugin

WordPress pagination plugin. Paginate content easily & efficiently. | Page-Links Plus
0 stars 0 forks source link

Insert Header #11

Open studiohypersetadmin opened 6 years ago

studiohypersetadmin commented 6 years ago

Allow the insertion of header to appear above each chunk of text. For instance, <!--header”My Book: Chapter 1”—>

This one would be HUGELY useful, especially for authors: The ability to add snippets above and below paginated content.

Here is my demo link again: https://mitty-walters.com/02stage/more-by-mitty/breaking-destiny-preview-css/

As you can see, I added a blue box heading at the top. I’d like for something that to repeat above every paginated page.

I imagine it would work by opening the page editor, then adding something like this: eof-above-every-page

<!--bof-above-every-page-->
<h1 style="text-align: center;"><span class="test">Breaking Destiny Preview</span></h1>
<!--eof-above-every-page-->
<!--bof-below-every-page-->
<h3 style="text-align: center;"><span class=“random”>Available October 1, 2018. Click this here to preorder.</span></h3>
<!--eof-below-every-page-->

This is a follow on to #3: Allow things to be placed above or below specific sections.

For instance, I may want the name of the chapter to appear above every page each chapter. And then below, I may want to provide hot-links so that a reader could jump to a different chapter.

This would first require a manual page break and would end at the next manual page break. I imagine something like this:


<!--nextpage-->
<!--bof-above-this-section-->
<h1 style="text-align: center;"><span class=“random”>Chapter 1: Disappointment</span></h1>
<!--eof-above-this-section-->

<!—bof-below-this-section-->
List of links to chapters
<!—eof-below-this-section-->```

Btw, these would appear *inside* of the every-page tags created above in idea #3.
studiohypersetadmin commented 6 years ago

I now have a working prototype… check it out:

https://mitty-walters.com/02stage/more-by-mitty/breaking-destiny-preview/

The header was inserted by adding to lines 179 and 372.

179

$content = str_replace("<!--nextpage-->", "", '<span class="destiny-head"><img src="https://mitty-walters.com/02stage/wp-content/uploads/elementor/thumbs/BreakingDestiny1line-nu6pj6xtm6mddaqrm6ed4iudvtq6xay3r7hvgtytfs.png" title="BreakingDestiny1line" alt="BreakingDestiny1line"></span><span class="kill-subhead">' . $content . '</span>');

372

$modified_exploded_content[$i] .= "\n<!--sh_nextpage-->" . '<span class="destiny-subhead"><img src="https://mitty-walters.com/02stage/wp-content/uploads/elementor/thumbs/BreakingDestiny1line-nu6pj6xtm6mddaqrm6ed4iudvtq6xay3r7hvgtytfs.png" title="BreakingDestiny1line" alt="BreakingDestiny1line"></span>';

Because #372 repeats regardless, I had to use CSS to get rid of the logo in single page, like so:

.kill-subhead .destiny-subhead { display:none; }

Now all that remains is a way to collect what I want inserted, then insert it on those two lines. Short of that, I’m stuck with the hard coded stuff every time I want to paginate.

studiohypersetadmin commented 6 years ago

Manually inserting tags undoes the main selling point of your mod: Automation.

Before finding your mod, that’s basically what I was going to do. The “Single Page View” button is a nice bonus (I think that’s what the free version does?), but automation is the only real thing authors need.

At the moment, I’m only trying to paginate previews for the two new books I’m about to release (about 7.5k words each). But many of my colleagues have much larger catalogs (10 or 20 books) and quite a few of them offer entire free books as incentive to entice new readers to signup for newsletters.

Imagine what a pain it would be to manually segment a book with 60k or 80k or 120k words!

At the moment, most authors distribute pdf/epub files… because there is no other choice. But believe me when I tell you, if there was a way to keep readers on their websites, authors would be lining up around the block.

I’ve never tried to segment this market, but I encourage you to explore it if you get a chance. Here is a quick shot at it: On average, 1600 to 2750 (depending on which stats you reference) books are published every day (traditional and self-pub, combined). The average author produces only 1.3 books per year. 72% of living, active authors maintain a website Of those websites, 91% are Wordpress This is a very big market, hiding in plane site. Your mod solves a huge problem. If you target this market by explaining your value proposition in a simple way—hey authors, here is an easy, elegant way to showcase your work—this plugin will be a smash hit.

I think anticipating what authors will need (my requests, haha) and delivering even before they ask will vastly increase the proliferation of your plugin.