User Tools

Site Tools


docs:theme_development:custom_post_types

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
docs:theme_development:custom_post_types [2026/04/12 11:12] – alicedocs:theme_development:custom_post_types [2026/04/12 11:12] (current) – [Practical Example] alice
Line 32: Line 32:
 To make use of custom post types for advanced features, a theme can use the "ssg_post_type" variable to determine if a custom post type is in use, and then using, for example, information stored in the post meta, render a different template that is more useful for the kind of information being displayed. To make use of custom post types for advanced features, a theme can use the "ssg_post_type" variable to determine if a custom post type is in use, and then using, for example, information stored in the post meta, render a different template that is more useful for the kind of information being displayed.
  
-====== Practical Example ======+===== Practical Example =====
 Lets say you want to store cooking recipes on your website. All recipes you store may have several things in common, lets say they all have: time to cook, a picture of the result, servings count and a flag saying if it's vegan or not. Lets say you want to store cooking recipes on your website. All recipes you store may have several things in common, lets say they all have: time to cook, a picture of the result, servings count and a flag saying if it's vegan or not.
  
docs/theme_development/custom_post_types.txt · Last modified: by alice