Skip to content

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

Open
wants to merge 15 commits into
base: trunk
Choose a base branch
from

Conversation

racmanuel
Copy link
Contributor

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.

racmanuel and others added 13 commits April 1, 2025 08:57
…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.
@cbravobernal cbravobernal added the documentation Improvements or additions to documentation label Jun 23, 2025
@cbravobernal cbravobernal requested a review from priethor June 24, 2025 15:02
Copy link
Contributor

@priethor priethor left a 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.

- **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
Copy link
Contributor

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.

Comment on lines 59 to 69
- 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

Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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](#)
Copy link
Contributor

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](#)
Copy link
Contributor

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 :)

Copy link
Contributor

@priethor priethor left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants