Skip to content

Commit b310e98

Browse files
author
Tom Mitchelmore
committed
Replace new Product
1 parent 1aeeceb commit b310e98

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/the-basics/post-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ And that's it! You can now start using your new Custom Post Type.
140140
:::
141141

142142
```php
143-
$product = new Product;
143+
$product = Timber::get_post();
144144

145145
// Bad
146146
echo get_field('price', $product->id);

versioned_docs/version-v7/the-basics/post-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ And that's it! You can now start using your new Custom Post Type.
140140
:::
141141

142142
```php
143-
$product = new Product;
143+
$product = Timber::get_post();
144144

145145
// Bad
146146
echo get_field('price', $product->id);

versioned_docs/version-v8/the-basics/post-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ And that's it! You can now start using your new Custom Post Type.
140140
:::
141141

142142
```php
143-
$product = new Product;
143+
$product = Timber::get_post();
144144

145145
// Bad
146146
echo get_field('price', $product->id);

0 commit comments

Comments
 (0)