Skip to content

Plugin that adds A-Z archive functionality to WordPress

Notifications You must be signed in to change notification settings

interconnectit/a-z-archive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A-Z Archive

Features

  • Post type archive that lists posts in alphabetical order.
  • Filter posts by letter or symbol.

Requirements

  • PHP >= 8.1
  • WordPress >= 5.8

Usage

Set the alpha_sort support for your post type.

register_post_type( 'post_type_name', [
    ...,
    'supports' => [ 'title', 'editor', 'thumbnail', 'alpha_sort' ],
    ...
] );

Or

add_post_type_support( 'post_type_name', 'alpha_sort' );

To show the filters on the post type archive page use the following code in your theme template file.

ICIT\StandFirst\PostSort\AtoZ::post_type_alpha_filters( 'post_type_name', [ 'title'=> 'Filters', 'all_title' => 'All Posts' ] );

About

Plugin that adds A-Z archive functionality to WordPress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages