Automattic / Automattic/jetpack
Testimonials and Portfolio Custom Post types: Unclear what pages the pagination option is valid for
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Issue
This is a preexisting issue with the Testimonials and Portfolio custom post type. When modifying pagination via Settings > Writing, it isn't clear that this will only affect archive / taxonomy pages (see https://github.com/Automattic/jetpack/blob/9f11871fd036c7b95869fe63b24ba4c03319ce07/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-portfolio.php#L667). If adding a list of testimonials / portfolios via the respective shortcodes, it won't apply.
### How to replicate
To replicate the issue:
* On a test site, visit Settings > Writing - `/wp-admin/options-writing.php` - (or Jetpack > Settings > Writing) and enable testimonials or portfolios.
* Add several testimonials or portfolio items
* Via the Settings > Writing page, set the pagination to a number smaller than the number of portfolio or testimonial items that you have added, for that type.
* On a new post, add a shortcode block, and add either `[testimonials]` or `[portfolio]`
* View the post, and notice that there is no pagination.
* Create an archive page (can be done via the Customizer if using a non block theme, adding a new menu, and including a testimonial or portfolio archive ape
* Visit that archive page and notice there is pagination.
### Expected result
* Either the UI should make it clear where the pagination applies, or it should also apply to the results generated by respective shortcodes.
### Prevalence
This will be the case on any site (self-hosted, WoA, Simple), regardless of version.
Reported in internal testing: p8oabR-1Bq-p2#comment-8332
Contributor guide
Research direction
Start by reproducing the behavior through /wp-admin/options-writing.php with the [testimonials] and [portfolio] shortcodes, then compare it with an archive or taxonomy page. Read projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-portfolio.php around line 667 to understand the current pagination scope. Done means the chosen behavior is explicit and the settings or shortcode results consistently match it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100