Continuing our box updates for changes in Thesis 2.0.3, we’re going move on to the Orbit slider. In terms of the options, we still have to get all of our select terms, that is our slider categories. But we don’t need id and class and we aren’t actually using an HTML element.
Combining Arrays in the Orbit Slider
What we’ll do is we’ll just copy this and let’s see, what did I copy? I should just copy, return and re-emerge. We’re going to wrap it in a div. That’s the first element of the array. This is the second element of the array and we’re getting rid of id and class because we don’t need to specify those anymore. And we don’t need that comma there and we need that.
Update the HTML
So fairly simple little thing here where we’ve put those two arrays together. And then the same thing is true for the HTML. So we will go ahead and HTML equals args equals false and then we’ll just grab those things. And so we have HTML id and class
Add Error Checking to Slide Category
Now slide category doesn’t have the same error checking and we want to add it to that. So we’re going to do this here, if not empty, this option’s slide category. And then just tack it on there. So if not empty, this option slide category then we’ll use slide category. Otherwise, we’ll set it to false.
And then we come down to our statement here and we’re going to echo. And we’re not echoing a div. We’re echoing an HTML. Really, we’re just going to come up here and copy this whole section because it’s the same thing.
Okay so we’re echoing the tab. The HTML element, if the id is there, we’ll put an id in. If the class is there, we’ll put a class in. Otherwise, we won’t put anything in. And then we’re going to have a little bit of error checking that says if the Orbit slider isn’t installed then you know, write this error message. If it isn’t stalled and the slide category is empty or if it’s not empty then do the shortcode with the Orbit slider with the slide category in. If it is empty then just do the shortcode without a category name in and then tab an HTML.
Review the Changes to the Orbit Slider
I think actually that’s pretty well wrapped up. So we’ll go ahead and upload this, come back over to our skin editor and refresh it. Look at our Orbit slider and we still have HTML and id that we could add in here if we chose. If we save the template, come back over and refresh this again and inspect the element on the slider, you can see that the slider is wrapped in this div. The div has no class and no id because we didn’t specify one. It’s just sitting there.
Now I’m just going to drag sample text out of this.