Download the PHP package jcore/dynamic-archive without Composer

On this page you can find all versions of the php package jcore/dynamic-archive. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dynamic-archive

JCORE Dynamic Archive

A WordPress plugin that adds a filterable, sortable and searchable post archive block, plus a latest/related posts block and a post picker block. Front-end filtering, pagination and "load more" are powered by the Interactivity API and its router, so the archive updates without full page reloads while every state stays linkable through the URL.

Templates are rendered with Timber, and themes can override any of them.

Requirements

An admin notice is shown if Timber is missing.

Installation

Install via Composer:

composer/installers places the package in the plugins directory. Activate it as usual, or load it from a must-use plugin together with your Composer autoloader.

Updates are delivered through jcore-update when that package is available.

Blocks

Dynamic Archive (jcore/dynamic-archive)

A post archive with optional front-end controls.

Query

Filters

Layout and pagination

Latest Posts (jcore/latest-posts)

Shows the newest posts of the selected post types, optionally limited to specific terms, with an optional heading, columns, order and sticky post handling. It can also inherit the current archive query.

The Related Posts (JCORE) variation shows posts that share terms with the current post. With backfill enabled, remaining slots are filled with other recent posts of the same post type.

Post Picker (jcore/post-picker)

Shows a hand-picked set of posts, or the newest posts in one term, with an optional heading and columns.

Theme integration

Post teaser (required)

The plugin does not ship a post teaser template. Your theme must provide one, looked up in this order:

Block Templates tried
Dynamic Archive dynamic-archive/partials/tease.twig, then partials/tease.twig
Latest Posts latest-posts/partials/tease.twig, then partials/tease.twig
Post Picker post-picker/partials/tease.twig, then partials/tease.twig

The template receives post (a Timber post) and nr (the 1-based loop index).

Overriding templates

The plugin's blocks/templates/ directory is registered as a Timber location after the theme's own locations. To override a template, place a file with the same relative path in your theme's Timber views directory, e.g. dynamic-archive/partials/filters/filter-checkbox.twig.

Pagination and "load more" can also be overridden via dynamic-archive/overrides/partials/pagination.twig and dynamic-archive/overrides/partials/load-more.twig.

Overridden templates must escape any block attribute they print (e.g. {{ attributes.searchLabel|e }}).

URL parameters

The archive state lives in the query string, prefixed per block instance as dynamic-archive-{instanceId}-:

Parameter Example
…-taxonomy[{taxonomy}][] dynamic-archive-3-taxonomy[category][]=12
…-sort dynamic-archive-3-sort=title-ASC, tax:category-DESC
…-search dynamic-archive-3-search=hello
…-archive-paged dynamic-archive-3-archive-paged=2

Taxonomy filters use term IDs by default. Switch to slugs with the jcore_dynamic_archive_taxonomy_field_type filter, and change the prefix with jcore_dynamic_archive_param_prefix.

Hooks

PHP filters

Filter Purpose
jcore_dynamic_archive_args Final WP_Query args of the archive.
jcore_dynamic_archive_tax_query Query args after taxonomy filters are applied.
jcore_dynamic_archive_tax_query_relation Relation between forced term groups (default OR).
jcore_dynamic_archive_handle_taxonomy_sorting Query args when sorting by taxonomy.
jcore_dynamic_archive_inherited_query_args Args inherited from the current main query.
jcore_dynamic_archive_inherit_sticky Apply sticky settings when inheriting the query (default false).
jcore_dynamic_archive_taxonomies_inherit Taxonomy filter configuration used when the block inherits the query.
jcore_dynamic_archive_taxonomies_filter The filter data (taxonomies and terms) passed to the templates.
jcore_dynamic_archive_taxonomies_filter_query_aware Only show terms that match posts in the current result (faceted filters, default false).
jcore_dynamic_archive_facet_term_query_args Query args used to find applicable terms for faceted filters.
jcore_dynamic_archive_use_post_type_term_usage Only show terms used by the selected post type (cached, default false).
jcore_dynamic_archive_term_post_type_usage_cache_ttl Cache TTL for the term usage lookup (default one day).
jcore_dynamic_archive_term_post_type_usage_post_statuses Post statuses counted in the term usage lookup.
jcore_dynamic_archive_taxonomy_field_type id or slug for taxonomy URL parameters.
jcore_dynamic_archive_param_prefix URL parameter prefix per block instance.
jcore_dynamic_archive_infinite_scroll_max_pages Highest page reachable with "load more" (default 50).
jcore_dynamic_archive_interactivity_context Interactivity API context of the block.
jcore_dynamic_archive_interactivity_state Global Interactivity API state.
jcore_latest_posts_args WP_Query args of the Latest Posts block (also applied to the backfill query).
jcore_post_picker_args WP_Query args of the Post Picker block.

Example: enable faceted filters for all archives.

JavaScript filters (block editor)

Filter Purpose
dynamicArchive.forbiddenPostTypes Post types hidden from the post type selector (default ['attachment']).
jcore.latestPosts.showPostTypes Post types offered in the Latest Posts block.
jcore.latestPosts.taxonomies Taxonomies offered for term selection in the Latest Posts block.
jcore.latestPosts.maxSelected Maximum number of selectable post types (default -1, unlimited).
jcore.latestPosts.maxItems Maximum value for posts per page (default 25).
jcore.postPicker.postTypes Post type slugs searched by the Post Picker (default: all viewable post types).
jcore.postPicker.taxonomies Taxonomies offered in the Post Picker's term mode.
jcore.postPicker.maxItems Maximum number of posts in the Post Picker's term mode (default 25).

Development

The block sources live in blocks/ and are built with @wordpress/scripts, using pnpm.

Don't edit files under blocks/build/; they are generated from blocks/src/.

Commits follow Conventional Commits. The changelog and releases are generated from them.

Changelog

See CHANGELOG.md.

License

GPL-2.0-only. See composer.json.


All versions of dynamic-archive with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ^2.3
jcodigital/jcore-update Version ^1.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jcore/dynamic-archive contains the following files

Loading the files please wait ...