[WordPress] Why I separate posts and custom post types

avatar
Share This:

The reason I started separating posts and custom post types stems from an experience I had with the WooCommerce Membership plugin in the past.

When I tried to write member-only articles using the WooCommerce Membership plugin, I discovered a significant bug. The issue was that even locked posts could be viewed via the WordPress app. I learned that this happened because the WordPress app retrieves “posts” using an API. As a result, if you write something as a regular post, it might be accessible through the WordPress app or Feedly, potentially exposing content meant to be kept secret.

With this in mind, I developed my current approach: articles that I want to announce updates for are categorized as “posts,” while those that I don’t want to announce updates for are categorized as “custom post types.” Although I’m not currently writing member-only articles, I might do so in the future. Moreover, there are times when I don’t want to announce updates for certain articles. In such cases, I use “custom post types” to publish those articles.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

8 − 8 =