Skip to content

Commit

Permalink
Merge branch 'develop' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Mar 14, 2018
2 parents ce26eb8 + 007010f commit 937f68e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/docs/controls/sortable.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,16 @@ Kirki::add_field( 'theme_config_id', array(
'priority' => 10,
) );
```

Example of how to load template parts based on the value of the control in a template:

```php
<?php
// Get the parts.
$template_parts = get_theme_mod( 'my_setting', array( 'option3', 'option1', 'option4' ) );

// Loop parts.
foreach ( $template_parts as $template_part ) {
get_template_part( 'partial-templates/' . $template_part );
}
```

0 comments on commit 937f68e

Please sign in to comment.