bu-ist / responsive-framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check Posts page setting when fetching archive link for news

ashleykolodziej opened this issue · comments

Responsive Version:

2.0

Expected behavior:

News archive links should use the Posts page setting in Settings > Reading, if it is defined, for the news archive link.

Actual behavior:

Responsive checks for pages using a news template, and returns the URL of the first one that happens to be using a news page template in alphabetical order. This is problematic because in the case that a website uses the News page template more than once, there is no way to control which news page gets the View All designation. The news template is often used to show news from a specific category in multiple sections - so counting on there being only one is fine as a backup, but should not be the first stop for THIS IS THE NEWS PAGE TO RULE THEM ALLLLLLLL.

Link(s) where this can be reproduced:

https://www-staging.bu.edu/history/

Steps to reproduce:

  1. Set a page beginning with "A" to use the news page template.
  2. Set a page called News to use the news page template.
  3. Any "view all" link for News will return the URL for A, not News.

This also appears to be impacting category links on single posts, if said category (for instance, Research) has a page template set to News and has the Research taxonomy selected in the News settings, it will replace the default wordpress category archive for Research with the page using the News template.