Archiveless #10 in SEO & Metadata
WordPress plugin to hide posts from archives (lists)
by Alley Interactive · github.com/alleyinteractive/archiveless · website
★ 8stars
13kcomposer installs
3forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alleyinteractive/archiveless/archive/refs/heads/main.zipAlso on Packagist as alleyinteractive/archiveless:
composer require alleyinteractive/archivelessFrom the readme
Archiveless
Excludes specific WordPress posts from archives (homepage, search,
date/author/term archives).
Adds meta to the head to
restrict inclusion in web searches.
Background
This plugin provides a way for content to live inside WordPress and still be
accessible by a direct URL but appear hidden everywhere else. Useful for culling
older content that shouldn't appear in search results because it is untimely.
Usage
By default, the plugin will prevent archiveless posts from appearing on the page. This is limited to the main
query of
the page. It will not affect other queries by default.
Archiveless posts can be excluded from normal queries by passing
excludearchiveless:
Handling archiveless posts with getposts() calls
Queries made with getposts() will always exclude archiveless posts by default
since getposts() sets a default poststatus of publish. To include
archiveless posts, you can specify the poststatus of any, declare the
poststatus explicitly with [ 'publish', 'archiveless' ], or pass
includearchiveless set to true:
Install
The plugin includes uncompiled Javascript. You can install the plugin by
tracking the main-built branch or by using a -built tag. Otherwise,
Read the full README on GitHub →