Hey this is elijah with the oxygen team and in this video i'm, going to show you what's new in oxygen 3.8 alpha 1.. First, i want to mention that 3.8 introduces a native rank. Math integration, the team over at rank math, was kind enough to provide us with the code required to allow rank math to analyze oxygen content, so that's now included with oxygen core.
This means that if you use rank math for seo on your site, you'll, now get scores and analysis based on content that exists in oxygen. The second thing i want to talk about is that we ' Ve made some major improvements to our code, editor that is used when you, edit code blocks style sheets.
Anything like that. So let's, pull up a style sheet here and we'll. Take a look at some of the new changes. So at first glance it looks pretty much the same, but let's. Go down here to the bottom, and here you'll, find a theme picker.
So we can choose between a few themes and we only included a couple of the themes that are available for code mirror to hopefully cover the bases and give folks some choice without being too overwhelming.
And we did include one really bright theme which hurts my eyes. But some folks will enjoy the increased contrast there. So let's, go back to dracula, which is my personal favorite, and you can see now that we have a little bit more contrast even on this darker theme, which is something that a lot of folks have brought up, that it'S kind of hard to see some of the things in the code editor with the default theme, so this will solve that problem.
You'll, also notice that i just clicked next to this curly brace here and i have matching bracket highlighting this extends to html tags. It's, going to highlight matching tags things like that things.
You expect from a proper code editor. We also have bracket autocomplete. So if we do something like my class and add a curly brace, it's, going to go ahead and auto close that opening bracket for us, which is pretty typical in a code editor.
And then, if we write something like font, color black and then let's, assume we messed up our formatting or we pasted this in from somewhere else. We can do something like background color, blue and if we have a bunch of code here that's, just not formatted properly, we can actually select the whole thing and hold down shift and press tab and it's going to go Ahead and auto format, we also changed our indentation to use tabs instead of spaces, which is going to be a little bit more consistent with most folks experience in a code editor, and we also added an option to make your lines wrap or not.
Depending on what you want a lot of times, if you have long class names or you're writing a lot of code, you're, going to run into situations where the code runs off the edge and you have to scroll this Wrap checkbox will fix that problem, so these changes, while relatively minor, are going to really improve the experience of writing code directly inside oxygen.
I know i personally am very excited to have these new improvements available directly inside the builder. Now those are the minor changes or updates that are included in 3.8 alpha 1. Now the major feature that we're introducing is something called advanced queries.
So let's, scroll down to the bottom of this blog post template and you can see. I have a related posts section here, and this is just a repeater that i've, built out to display the post and a featured image, and things like that.
It also displays the categories, but the problem is right. Now we are using the default query, which just returns the post we're on. We, obviously don't want that, and related posts can be a little tricky to do in oxygen.
There are ways to do it, but a lot of it involves using pre-get posts and kind of changing the query in ways that just aren't very intuitive. We've added an advanced query option for repeaters and easy posts to allow us to satisfy some of those more advanced use cases.
So let's. Click. Our repeater here go to query and we'll go to advanced. Now we've included a few presets, but we probably will want to include a bunch more so during testing. If you notice a use case, that is going to be very common that you think should be included, be sure to let us know on github, but here are the ones that we've included so posts of the same post type as the current Post all posts, except the current post, children of the current post related posts by terms random related posts by terms and posts by author of current post or archive.
So you can see we have some far more advanced options here than what you can achieve through the default customer manual queries. Now let's just go ahead and set this up to show related posts by terms now.
What we want to do here is we want to show all the posts with the same categories. So we just use category as our taxonomy and hit apply, and now you're, going to see that we have a number of posts returned here and they all have at least one matching category with the post that we're.
Viewing now to give you a look at what it's like to build one of these. If you want to build your own query, we'll, just go ahead and edit this one, and you can see here. This looks a lot like our dynamic data dialogue or our conditions dialog, and this allows you to visually build a query based on all of the parameters that wp query accepts so right.
Here we have post type and we're grabbing. The post type of our current post, the one we're viewing and using that as a query parameter. So we're, going to be finding the posts with the same type as the current post type and then down here.
We have a taxonomy query, which uses an array and we're looking for a category with the terms that match the terms of the post, we're on and then down here. We're using post, not in to make sure that the post we're on is excluded from these results.
Now, if we want to make sure we only have a certain number of posts say we want three returned here. We can click, add parameter and we're, going to use our drop down here to find the parameter we want - and in this case we're looking for posts per page which is going to be down here under pagination.
Let's, go ahead and click that and then we click add value, and now we can tell it how many posts per page we want. So let's. Do three and let's, go back here and apply those query parameters, and now we have three posts now we may want to remove the pagination completely.
So let's, go ahead and edit the query and let's. Click add parameter and then we're, going to go down and look for no found rows, which i think will be under caching here. So let's, do no found rows, click, add value and just say true and then i believe that will be enough to go ahead and just hide our pagination.
So now we have three posts returned that match the categories of our parent post here. So we're, viewing a post with the food and music categories. Let's, scroll down and see what the related posts are.
So you can see here. We have one with experiences in food. We have one with music and travel and we have one with just food. So now we ' Ve got these related posts that are returned using dynamic data in a query.
So this is a more advanced feature, but it allows a lot more power in the way queries can be built in oxygen, using dynamic data and some other examples of how this can be used. Is you can build things like author archives really easily to make sure you're pulling posts? By that specific author? You can do random related posts, which we have a preset for.
We can do related posts by taxonomy, excluding the current post, which i just showed you there. We can do related posts by an acf field. For example, if you have a podcast episode post type, where we want to show a list of quotes, which is another custom post type and the episode post and the quotes post are going to have a matching episode number, you can query that to make sure you Only grab quotes that match the current episode.
You can do things like an events, query that allow you to use a mediquery to find events with certain dates and only return, events that are upcoming or events that have already passed. Things like that, and you can also do queries where, for instance, you're only showing children of the current post.
So this really opens up a lot of possibilities and it's all using wp query. So there's. A lot of information out there about how all the parameters work and how to use them, and basically you just take that knowledge and you can just directly plug it in using our dynamic query.
Dialog now 3.8, alpha 1 doesn't include any bug fixes or anything, but we have quite a few bug fixes tweaks and improvements lined up for 3.8 beta 1., so stay tuned to see all the stuff we're doing there, but For now, these are the new things that are being introduced by 3.
8 alpha one, and i look forward to receiving your feedback and continuing to improve these items as we continue through the release cycle again. This is elijah with the oxygen team and thank you very much for watching.