Update content categorization and handle hierarchical documentation

Enhancements were implemented to support hierarchical documentation. Local CMS now respects parent ID and order attributes of content items, and content can be categories as 'blog' or 'documentation'. Changes were also made to the wordpress integration supporting these new categorizations. Introduced working with nested documentation pages.
This commit is contained in:
giancarlo
2024-04-03 21:06:54 +08:00
parent 3fd216ba6e
commit 53afd10f32
22 changed files with 350 additions and 156 deletions

View File

@@ -41,4 +41,23 @@ You will be asked to set up the Wordpress instance when you visit `http://localh
## Note for Wordpress REST API
To make the REST API in your Wordpress instance work, please change the permalink structure to `/%post%/` from the Wordpress admin panel.
To make the REST API in your Wordpress instance work, please change the permalink structure to `/%post%/` from the Wordpress admin panel.
## Blog
To include Blog Posts from Wordpress - please create a **post** with category named `blog` and add posts to it.
## Documentation
To include Documentation from Wordpress - please create a **page** with category named `documentation` and add posts to it.
This involves enabling categories for pages. To do this, add the following code to your theme's `functions.php` file:
```php
function add_categories_to_pages() {
register_taxonomy_for_object_type('category', 'page');
}
add_action('init', 'add_categories_to_pages');
```
Please refer to `wp-content/themes/twentytwentyfour/functions.php` for an example of a theme that includes this code.