Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for Link Roundups in archives #1122

Merged
merged 2 commits into from
Feb 7, 2016

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Feb 5, 2016

Changes

  • Create partials for use in Largo:
    • content-rounduplink.php: no byline, very little in the way of content. This is essentially a rehash of the argolinks partial removed for Remove partials/content-argolinks.php #926.
    • content-roundup.php:
      • displays whole the_content() in archives, as the content will be primarily shortcodes and thus will not be rendered in largo_excerpt.
      • byline is output, buy .visuallyhidden
  • In archive.php and category.php, use largo_get_partial_by_post_type for the partial selector, so those can be filtered with largo_partial_by_post_type.

A demonstration of the content-roundup.php partial in the archive:

screen shot 2016-02-05 at 5 43 38 pm

Generated saved links, with one edited to have a description and link:

screen shot 2016-02-05 at 5 44 19 pm

## Why

While the Link Roundups plugin can use the filter largo_partial_by_post_type, it can't provide partials that will be loaded by get_template_part( 'partials/content', $partial ) unless we also filter the partials/content part of get_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.

@benlk benlk added this to the 0.5.5 - Story Elements milestone Feb 5, 2016
aschweigert added a commit that referenced this pull request Feb 7, 2016
Improve support for Link Roundups in archives
@aschweigert aschweigert merged commit 773796f into master Feb 7, 2016
@aschweigert aschweigert deleted the WE-90-better-link-roundups-support branch February 7, 2016 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants