### Install Sage Directives via Composer Source: https://github.com/log1x/sage-directives/blob/master/docs/README.md This command installs the Sage Directives package using Composer, a dependency manager for PHP. Ensure you have Composer installed and configured for your project. ```bash composer require log1x/sage-directives ``` -------------------------------- ### Build Documentation with Yarn Source: https://github.com/log1x/sage-directives/blob/master/docs/README.md These commands are used to build the project's documentation. It first installs the necessary Node.js dependencies using Yarn and then executes the documentation build script. ```bash yarn install yarn run docs:build ``` -------------------------------- ### Echo Field Value with @field Directive (PHP) Source: https://github.com/log1x/sage-directives/wiki/Advanced-Custom-Fields The @field directive echoes a specified ACF field value. It supports passing a post ID to retrieve fields from a specific post and an array key to access specific values within an array field. This directive requires ACF to be installed and activated. ```php @field('text') @field('text', 1) @field('image', 'url') @field('image', 'url', 1) ``` -------------------------------- ### Initialize WP_Query with @query Directive Source: https://github.com/log1x/sage-directives/wiki/WordPress The @query directive initializes a standard WP_Query object, assigning it to the $query variable. It accepts the usual WP_Query parameters as an array, allowing for flexible post retrieval. ```php @query([ 'post_type' => 'post' ]) ``` -------------------------------- ### Flexible Content Layout Handling (@layouts) Source: https://github.com/log1x/sage-directives/blob/master/docs/usage/acf.md A helper for managing flexible content fields, similar to @fields. Can retrieve layouts for a specific post by ID. Closes with @endlayouts. ```php @layouts('components') [...] @endlayouts ``` ```php @layouts('components', 1) [...] @endlayouts ``` -------------------------------- ### Inline CSS File Loading with @inline Directive (PHP) Source: https://github.com/log1x/sage-directives/blob/master/docs/usage/helpers.md This directive loads the content of a specified CSS file directly into the current view. It assumes the file path is relative to the theme directory. The output will be the raw CSS content, typically intended to be wrapped in a