Hi Martin,
Yes, I’ve added the proper CSS class to the JSON, and it’s working perfectly on pages, but not on CPT’s.
Looking at Dev tools, I can see the JS being added on the pages, but on the CPT the JS doesn’t load at all.
I’m assuming because CPT’s aren’t normal post-types, they aren’t supported yet?
You can see it working properly on this page:
https://eleanorspensart.co.uk/gallery/
But here’s a CPT where it’s not working:
https://eleanorspensart.co.uk/gallery-piece/crows-gathering/
I’m using the same CSS class on both URL’s.
Here’s the JSON – I’ve tried adding ‘gallery-piece’, as that’s the CPT name, but it’s not working. It doesn’t work no matter what combination I’ve tried.
{
"$schema": "./settings/settings-schema.json",
"hrefTypes": [
"Empty",
"Media"
],
"postTypes": [
"page",
"post",
"home",
"front",
"gallery-piece"
],
"cssClassesToSearch": [
"wp-block-image",
"gallery-piece-image",
"wp-block-media-text",
"wp-block-video",
"postie-image",
"wp-block-embed-youtube",
"page-header-image-single"
],
"excludeIDs": [
0
]
}