Hi !
I’m trying to create a multisite and multilingual wordpress website.
I have configured the first website in multilingual with the settings file and the « subdirectory » params but when I create the other website, the url matches with the first website and doesn’t care what the « match » params are.
const settings = [
//FIRST SITE FR
{
name: 'Frontity site 1 FR',
match: ['https://wp-frontity.local/', 'http://localhost:3000/'],
state: {
frontity: {
url: 'https://wp-frontity.local/',
title: "Frontity FR",
description: "Frontity description FR"
}
},
packages: [
{
name: 'my-first-theme',
state: {
theme: {
lang: 'fr',
autoPrefetch: "hover",
}
}
},
{
name: '@frontity/wp-source',
state: {
lang: 'fr',
source: {
url: "https://wp-frontity.local/",
homepage: "accueil",
postsPage: "articles",
postTypes: [
{
type: "destinations",
endpoint: "destinations",
archive: "/destinations"
}
],
api: "https://wp-frontity.local/fr/wp-json",
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
]
},
//FIRST SITE EN
{
name: 'Frontity site 1 EN',
match: ['https://wp-frontity.local/en/', 'http://localhost:3000/en/'],
state: {
frontity: {
url: 'https://wp-frontity.local/en/',
title: "Frontity EN",
description: "Frontity description EN"
}
},
packages: [
{
name: 'my-first-theme',
state: {
theme: {
lang:'en',
autoPrefetch: "hover",
}
}
},
{
name: '@frontity/wp-source',
state: {
lang: 'en',
source: {
url: "https://wp-frontity.local/en/",
subdirectory: 'en',
homepage: "home",
postsPage: "articles",
postTypes: [
{
type: "destinations",
endpoint: "destinations",
archive: "/destinations"
}
],
api: "https://wp-frontity.local/en/wp-json",
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
]
},
//SECOND SITE FR
{
name: 'Frontity site 2',
match: ['https://duplicate-one.local/'],
state: {
frontity: {
url: 'https://duplicate-one.local/',
title: "Frontity Site 2",
description: "Frontity description Site 2"
}
},
packages: [
{
name: 'my-first-theme',
state: {
theme: {
lang:'fr',
autoPrefetch: "hover",
}
}
},
{
name: '@frontity/wp-source',
state: {
lang: 'fr',
source: {
url: "https://duplicate-one.local/",
homepage: "accueil",
postsPage: "articles",
postTypes: [
{
type: "destinations",
endpoint: "destinations",
archive: "/destinations"
}
],
api: "https://duplicate-one.local/wp-json",
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
]
}
]
export default settings;
Thanks for your help