Closed sanderdekroon closed 1 year ago
Anybody from @OpenWebconcept/yard-digital-agency who can comment on this?
Hi Sander, I'll take a look on monday. Busy week this week :)
I looked into this and it's funny because I didn't even know that there was something as a post type 'openpub-theme' and 'openpub-subtheme'. In fact I don't believe we use them anywhere.
If you need something to categorize OpenPub items I think it would be better to try and solve this with taxonomies first: https://developer.wordpress.org/plugins/taxonomies/working-with-custom-taxonomies/
In my opinion this is a better approach than creating post-types and linking them al together with posts_to_posts relations.
I think the 'openpub-theme' and 'openpub-subtheme' should be deprecated. But if you really want to use them we could create an option to make them available in the admin (setting the 'public' property from false
to true
). As for Elasticsearch, this is no longer an issue.
Openpub items already have the taxonomies "Type", "Doelgroepen", "Toepassingen", and (optionally) "Tonen op". We started using those instead of post types some time ago.
Please don't deprecate them :). We're using them extensively to categorize openpub items and query 'related' openpub items to PDC themes.
But besides that, while you might not use them, I think this openpub-theme post type is consistent behaviour when compared to the OpenPDC. If it's alright with you, I will create a PR to update the public
property.
@SimonvanWijhe, I believe we can set the status of 'public'
to true
. We have additional settings in our own elasticsearch plugin which configures the indexable post_types.
No problem, we can just leave the extra post types in.
It would be great if making these post types visible is optional. Since just changing public
into true
will make the post types visible in all our sites as well. And we don't want that.
You could either create an extra checkbox under "Openpub Instellingen" or apply a filter. Both equally fine to me.
@mvdhoek1 you are right, setting public
to true
does not effect our elasticsearch anymore.
@sanderdekroon je kunt het doorvoeren. Dan voer ik het vandaag nog door.
In the
openpub-theme
post type thepublic
option has been set to false, which means it does not show up in the admin menu. This makes it impossible for our editors to add a new theme.https://github.com/OpenWebconcept/plugin-openpub-base/blob/9877217ba70d773a9e1be5207365f71b1e0d9a8b/config/posttypes.php#L111
According to the code comment it's because of excluding the theme's from syncing with Elasticsearch. I'm left wondering how you add new themes? And might it be possible to exclude this/these posttype(s) from Elasticsearch through other means?