"Frontity Query Options" are query string parameters added to the URL that start with
Any query parameter in the URL that starts with
frontity_ is a "Frontity Query Option".
They can be used to dynamically configure certain options in the Frontity state.
It is important to note that Frontity Query Options do not form part of the canonical link. This means that whatever is passed in the
frontity_query parameter will not be matched by handlers or used to fetch data from WordPress. Its purpose is merely to allow dynamic configuration of Frontity.
Query string parameters that start with
frontity_ are reserved to send special information to Frontity, i.e. they are not related to the URL that needs to be rendered (e.g. a post or a page), but instead are used to change the Frontity configuration dynamically.
These parameters are removed from
state.router.link because they should not affect the content of what needs to be rendered such as a post or a page.
If Frontity Query Option parameters are present in the URL then they are added to
state.frontity.options, and the properties are then available to any packages that need them.
Note that the key names of parameters are camelCased when they are added to
state.frontity.options. So, for example, the
frontity_source_authquery string param will become
Only key names are transformed in this way, values remain unchanged.
Some "Frontity Query Options" are used by
@frontity/core, such as:
frontity_name -> state.frontity.options.name: The name of the site you want to load.
Note that the
frontity_namesetting is used only in development and only in Frontity multisite.
However packages can also make use of them, for example:
frontity_source_auth -> state.frontity.options.sourceAuth: An authentication token for the source package.