Simple Query example

This is a example how a query could work & you don’t want to watch a 10 min. video. :stuck_out_tongue:
If you are new to this, watch this video.

For starters we will create 3 pages and query them on one of those pages.

Let’s create the pages.

grafik

Ok, now let us edit the Query Test page.

Open the navigation bar (button top right) and pull it to the left side. Add a section for a little spacing and in that section a query block.

Animation (5)

While the query is selected, go into the primary tab (to the right), deactivate the Inherit query from URL button and enter the Query Editor.

Animation (2)

Now we choose a Post Type to query for. In our case we will use Pages

Animation (4)

To the Query we will add a Query Template then a Div and a Heading. The div contains all the content you want to display. When we add the div we can already see 3 spaces, which represent the pages which we created. By using the header and feeding it with the dynamic WordPress data, we can display everything that is naturally integrated with WordPress. But because we simply want to clarify which page is which we select the Post Title. If you save and refresh the page, you should see all three page titles.

Animation (6)

Have fun

2 Likes