-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Takahashi Fumiki edited this page Apr 10, 2024
·
3 revisions
Taro Series is a custom post type for serial content.
- Create a custom post type named "Series".
- The designated post type will be part of a "Series", and a metabox to link the post to a series will be displayed.
The following features are provided to link a series with its posts:
- "Series Table of Contents" block. This displays a list of articles belonging to the same series from any article.
- "Automatic Series Table of Contents". With theme customizer settings, a table of contents for posts belonging to the same series is automatically displayed if it is a series. This makes lateral movement through the content easier.
You can customize the appearance by placing templates in each theme directory. It's safe to copy the template-parts
directory found in the plugin and delete anything unnecessary.
template-parts
- series
- item.php // Each item displayed in the table of contents.
- list.php // The entire table of contents.
Additionally, a special permalink for "articles in this series" is added, and URLs like /series/%series_slug%/
become available.
The template is chosen in the following order:
- archive-in-series-{series-slug}.php
- archive-in-series.php
- archive.php
- index.php
- Try searching for
tar_series_
. There are many hooks available. - There are functions available in
includes/functions.php
. - By setting
orderby
toseries-updated
inWP_Query
, ordering by descending (order=desc
) will arrange the posts by "the most recently updated article in that series", while ascending (order=asc
) will arrange them by "the oldest article in the series".