You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/back-end/wordpress/wordpress.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ The [ACF documentation](https://www.advancedcustomfields.com/resources/getting-s
31
31
32
32
Timber provides a number of [functions](https://timber.github.io/docs/guides/functions/) that helps developers gain access to and manipulate data in ACF fields. In Timber, templates use the [Twig Template Engine](https://twig.symfony.com/) separate from PHP files, which helps organize and simplify code. The [Timber Starter Theme](https://timber.github.io/docs/getting-started/setup/#use-the-starter-theme) makes it easy for developers to build out templates for ACF Field Groups in Twig. Without Timber, fields are typically templated like this:
33
33
34
-
```
34
+
```php
35
35
<?php if( have_rows('event') ): ?>
36
36
<ul>
37
37
<?php while( have_rows('event') ): the_row(); ?>
@@ -42,9 +42,10 @@ Timber provides a number of [functions](https://timber.github.io/docs/guides/fun
42
42
</ul>
43
43
<?php endif; ?>
44
44
```
45
+
45
46
Twig, through Timber, provides an object oriented approach with a suite of [filters](https://twig.symfony.com/doc/3.x/filters/index.html) and [functions](https://twig.symfony.com/doc/3.x/functions/index.html) for manipulating field data. Template code in Timber looks like this:
46
47
47
-
```
48
+
```twig
48
49
<h2>{{ post.title }}</h2>
49
50
<div class="my-list">
50
51
{% for item in post.meta('my_repeater') %}
@@ -56,13 +57,15 @@ Twig, through Timber, provides an object oriented approach with a suite of [filt
56
57
{% endfor %}
57
58
</div>
58
59
```
60
+
59
61
### idfive Component Library
60
62
61
63
idfive marks up and styles components using the [idfive Component Libray](https://bitbucket.org/idfivellc/idfive-component-library)("ICL"). Typically in a project, the front end team members will build components in a copy of the ICL in the Timber starter theme directory, then build twig files for the markup and display of components made up ACF Field Groups, with the theme including CSS generated by the ICL in the main theme using the [wp_enqueue_style](https://developer.wordpress.org/reference/functions/wp_enqueue_style/) function.
62
64
63
65
## Alternate Tools and Methods
64
66
65
67
idfive may alternatively build out a site without Timber if Timber does not meet the client needs. In the past, idfive has used other tools such as:
@@ -82,15 +85,16 @@ idfive develops many sites, at least initially, on [Pantheon](https://pantheon.i
82
85
83
86
First, create a sandbox site on Pantheon. Once the site is created on Pantheon, you can initialize and download the site to your local machine using:
84
87
85
-
```
88
+
```bash
86
89
lando init
87
90
```
88
91
89
92
This command will respond with a series of questions. Select the Pantheon recipe, log in with your Pantheon credentials. The repo will be downloaded and initilialize in the current directory. Once that is complete, cd into the new directory and type:
90
93
91
-
```
94
+
```bash
92
95
lando pull
93
96
```
97
+
94
98
lando pull gives the option of pulling from any environment, code, database, and files. The init process only downloads the code. It is fine to skip pulling code at this point, but pulling the database and the fiels so that you have an exact match of the site on the server.
0 commit comments