Skip to content

Feature idea: optionally populate top and featured posts automatically when prominence tax query returns empty #1857

@ChrisHardie

Description

@ChrisHardie

To prevent an accidentally broken-looking front page, and perhaps to improve the "just starting out with Largo" experience, I'd like to configure a site with the "Top Stories" layout to pull in a single "Top Story" and "Featured Stories" posts from a different/default/fallback query if the results of the prominence taxonomy queries come back empty.

I could imagine doing this by filtering the output of largo_get_featured_posts(). Alternatively, we could add some logic to homepages/templates/top-stories.php that handles this, perhaps along with a theme option checkbox, "Highlight recent posts when no top/featured stories are configured." (I can understand why some publishers would want broken-looking over the most recent post being considered "top".)

If you have other suggested ways of achieving this, or thoughts about why it is or isn't a good idea, great! Otherwise I may work on a PR for this soon. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions