Improve support for Link Roundups in archives #1122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
content-rounduplink.php
: no byline, very little in the way of content. This is essentially a rehash of theargolinks
partial removed for Remove partials/content-argolinks.php #926.content-roundup.php
:the_content()
in archives, as the content will be primarily shortcodes and thus will not be rendered inlargo_excerpt
..visuallyhidden
archive.php
andcategory.php
, uselargo_get_partial_by_post_type
for the partial selector, so those can be filtered withlargo_partial_by_post_type
.A demonstration of the
content-roundup.php
partial in the archive:Generated saved links, with one edited to have a description and link:
## Why
While the Link Roundups plugin can use the filter
largo_partial_by_post_type
, it can't provide partials that will be loaded byget_template_part( 'partials/content', $partial )
unless we also filter thepartials/content
part ofget_template_part
.So, a compromise:
To get the
/rounduplink/
and/roundup/
archives, all that needs be done is for the site user to resave permalinks after activating the plugin. Both post types are registered with'has_archive' => true,
, so the archives will automatically be available in at those urls.