Text snippets shared across posts

I’d like to add a “fast facts” section to a wordpress site – an area in the sidebar where snippets of text are rotated.

Where is the best place to store things like this? Widgets don’t really allow repeated items grouped in a good way & i don’t want to add a post type as that would be available as a page with a URL

1 Answer
1

It sounds like you do want a custom post type, you just want to set the public argument to false. The register_post_type() has lots of arguments that will let you do everything you probably want. Along with public, you’ll probably set has_archive to false. Setting show_ui to true will allow you to manage the posts in the backend.

If you want to group the “fast facts” in any way, register a taxonomy to go along with your post type.

Obviously, you’ll still have to fill in some blanks and write a widget to put into the sidebar, but I think this answers your main question.

Leave a Comment