-
Notifications
You must be signed in to change notification settings - Fork 31
Updates the documentation: Adds tutorials on creating post types, custom fields, taxonomies, and options pages, and improves guidance on the relationship between post types, taxonomies, and custom fields. #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
…ts, and optional admin menu and update notification hiding docs: update SCF installation guide with Composer integration, benefits, and optional admin menu and update notification hiding
let's not take for granted that readers are familiar with Composer Co-authored-by: Héctor <[email protected]>
avoid potential conflicts between Composer and the built-in updater Co-authored-by: Héctor <[email protected]>
…tom fields, taxonomies, and options pages, and improves guidance on the relationship between post types, taxonomies, and custom fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for such a comprehensive addition, @racmanuel ! 🚀
I've added a few comments, some of them are me thinking out loud to start a discussion. The style-related ones apply to more parts than where I initially left them, though.
docs/tutorials/first-custom-field.md
Outdated
- **Field Name**: A unique identifier used in code (e.g., `director`) | ||
- **Field Type**: Choose from text, textarea, number, image, checkbox, select, and more | ||
- **Instructions**: Optional helper text to guide users | ||
- **Required**: Whether this field must be filled in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required is on a different tab. The list should be ordered according to the UI or by required vs optional.
docs/tutorials/first-custom-field.md
Outdated
- Go to a post of the type you've targeted with the field group. | ||
- You should now see your custom fields below the content editor. | ||
- Fill in test data and save the post. | ||
- Confirm the fields save and appear as expected. | ||
|
||
## Next Steps | ||
|
||
- Display the custom field values on the frontend using SCF template functions | ||
- Use conditional logic or field groups to organize complex forms | ||
- Combine with taxonomies or other field groups for richer structures | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an inconsistency between ending the sentences with a period or not. If I'm not mistaken, full sentences need to end with a period and phrases don't.
|
||
**What is an options page?** | ||
|
||
An options page is a custom admin screen where you can store site-wide settings that are not linked to individual posts, pages, or taxonomies. These values are useful for things like contact details, configuration values, or custom messages that may appear across your theme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
across your theme
How are these options related to themes? What would be an example?
- Enter a descriptive name | ||
- Configure labels | ||
- Set visibility options | ||
- **Title**: Adds a title field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed the spaces after the hyphen; is there any linting rule that requires this?
|
||
- You want content that doesn’t belong under blog posts or pages | ||
- You need a unique admin menu and editor for managing this content | ||
- You want to separate things like `Movies` from standard posts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this different than the first item? Maybe we should mention instead that we want to manage structured content.
**Example (Movies):** | ||
Create a taxonomy called `Genre` and attach it to the `Movie` post type. This lets users filter all movies tagged as `Action`, `Comedy`, or `Drama` — and even group them by sub-genres if hierarchical. | ||
|
||
To learn how to create one, see: [Creating Your First Taxonomy](#) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing link
**Example (Movies):** | ||
Use custom fields to store each movie's `Director`, `Release Year`, `Duration`, `Trailer URL`, and `Poster Image`. These are all values unique to each movie and not ideal for filtering across many movies like taxonomies would be. | ||
|
||
To learn how to create one, see: [Creating Your First Custom Field](#) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing link, we can still add a relative link to the newly added tutorial :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for such a comprehensive addition, @racmanuel ! 🚀
I've added a few comments, some of them are me thinking out loud to start a discussion. The style-related ones apply to more parts than where I initially left them, though.
Updates the documentation: Adds tutorials on creating post types, custom fields, taxonomies, and options pages, and improves guidance on the relationship between post types, taxonomies, and custom fields.