Skip to main content

8 docs tagged with "Introduction"

View All Tags

Creating a simple template

L&L is powerful enough to build entire site themes, but we’ll start by looking at a basic template example to get familiar with the fundamentals. A template is the custom post type associated with Loops & Logic. Any L&L markup you write, including the code in the example below, will need to be added inside a template. Instead of sticking to default WordPress post types, we’ll make things a little more interesting by using custom fields. Let’s see it in action!

Displaying an L&L template

Now that you’ve seen a few dynamic tags in action, you might want to start tinkering with L&L templates on your own and learning about all the other dynamic tags available to you in the template editor. Experimentation is our favorite way to learn, but there’s one more thing to understand first: how to load an L&L template onto a page.

Importing and exporting L&L Templates

The Import & Export tool enables the import and export of blocks, templates, styles, scripts or layouts via .json files. It can be found in the WordPress Admin under Tangible > Import & Export.

The syntax of L&L markup

Let’s take a look at some of the rules for writing L&L markup. Many tags will have their own unique format based on how the tag works, but the syntax below sets the ground rules that apply across the entire markup language.