Append or Display other_title after title in chapterlist for mobile and desktop chapter navigation #31
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Current chapterlist navigation dropdown only displays title in the chapter navigation.
By convention, one would think that;
Title as Chapter number
Other_title as Chapter Title
Eg:
Chapter 1
Prologue
This is based on what I've seen normally on other Wordpress novel sites.
So, I guess you could improve the chapterlist navigation dropdown displaying one, or either both?
Chapter 1: Prologue
Chapter 2: XXXXX
Other improvement could be made includes, if the chapters have groupings, you could display that in the dropdowns eg:
Arc 1 (non-clickable but expandable?)
Chapter 1: Prologue
Chapter 2: XXXX
Arc 2
Chapter 3: XXXX
Chapter 4: XXXX
Hello again!
I'm not using the title as chapter number, that would be highly problematic since WP only stores the main title in the Posts database table, which is relevant for queries and search queries. Meta fields are slow. Wasting the title for "Chapter X", which is not even unique? Yeah, no.
But let's take a step back, because I still need to fully understand what you need. We are talking about this here, right? That is internally called the chapter index (because I got too many lists).
You got me a bit confused because there is no "other_title" meta field. So you either mean the Chapter Prefix, which is not rendered anywhere but inside the story chapter list, the List Title only used on small cards and also in the chapter index as shown above, this custom snippet with a similar issue, or something you added yourself (in which case you are on your own).
The
fictioneer_get_chapter_list_items()
function is due for an update, and I may be willing to add some things, perhaps a filter for customization. I'm not going to show the chapter groups, though. I'm also not changing the global chapter naming scheme and force that upon everyone else. You may want that, others do not.I understand that everyone wants to do their own thing, but I cannot accommodate everyone. Especially not for free. But if you just want to modify the title in the index popup (and by extend mobile menu), this can be done.
For clarity:
I meant like what the picture you gave as an example.
Alright. I will wait for next update.
I added a new filter to modify the chapter index list items and an example on how to prepend the chapter prefix. This will only work after the 5.16.0 update and not affect anything but the index (mobile menu too). You can add filters in a child theme. Modify the code if you need to, I assumed you want to use the chapter prefix (enable Advanced Meta Fields in the settings if you do not see the field).