frontity.settings.js
.frontity.settings.js
needed for determining the URL of the WordPress data source is:state.source.url
: The URL of the WordPress. Required.state.source.url
should point to just the URL of your WordPress (i.e. https://test.frontity.org
) and not the URL of your WordPress REST API (i.e. https://test.frontity.org/wp-json
). The URL of of the REST API will be calculated by Frontity depending on each use case.state.wpSource.isWpCom
: A flag to indicate a special use case of WordPress.com sites (Personal or Premium plans). It is not required for Free WordPress.com sites. Defaults to false
.state.wpSource.prefix
: The prefix of the API. Defaults to /wp-json
. It is not used if isWpCom
is true
.@frontity/wp-source
package, the property state.source.api
should never be set manually by the end users (it will be computed from the properties mentioned above)https://test.frontity.org/
.state.source.url
property.state.source.api
: https://test.frontity.org/wp-json
(value computed from state.source.url
and state.wpSource.prefix
).state.wpSource.isWpCom
: false
(value derived from state.source.api
)https://frontitytest.wordpress.com/
.state.source.url
property.state.source.api
: https://frontitytest.wordpress.com/wp-json
(value computed from state.source.url
and state.wpSource.prefix
).state.wpSource.isWpCom
: true
(value derived state.source.api
)state.source.url
property, but in addition to this you also need to specify that it is a Personal or Premium WordPress.com plan installation by setting state.wpSource.isWpCom
to true
.state.source.api
: https://public-api.wordpress.com/wp/v2/sites/test-premium-plan.frontity.org
(value computed from state.source.url
& state.wpSource.isWpCom
)state.source.url
state.wpSource.isWpCom