Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In some ways the dynamically-related files feature is too good. Once you've loaded a primary WordPress page into Dreamweaver, like this one picked up from the previous lesson, you'll get links to an overwhelming number of files. The Related Files Filter can help you narrow those down to just the ones you want. So now we have, as I said before, a little over 70 different files. Let me show you how to hone in on just the ones you want. This icon over on the top-right opens up the Filter Related Files dropdown where initially you can see All Files Type.
Now there are three different file types that are included here, CSS, PHP, and XML. This list is populated dynamically depending on what the initial PHP file is related to. Not all will have XML files, for example, so we can disable that XML option if we like, as I deselect the XML option it disappears. Of course the file is not trashed, it's just hidden from view, and you can narrow the displayed files even further.
You of course have access to all the other PHP files like the wp-blog-header.php file. Let's say that you want to narrow the displayed files even further, and that you're only really interested in the CSS file. So I'll go back to my filter and deselect the PHP file type, and we're left with just the one PHP file that I currently have opened and style.css. You may be wondering why didn't the PHP file, that we're looking at disappear as well? Well, that's because we have it open, and Dreamweaver wants to be sure that you're finished working with it.
So to make it go away all you need to do is select the style.css file. Let's go back, and I'm going to show all the file types again, by choosing the top option in the filter Show All File Types. Now they're all back, because I want to show you another way to filter your files. Sometimes what you're looking for cannot be easily divided by file extension, you might be looking for a specific file. For this we go to the Custom Filter option. Let's open up the Filter dropdown one more time, and the last option on the list is Custom Filter.
So I'll select that, and a new dialog box opens up. Let's say we're looking for a file called header.php--that I happened to know the file name of--so I can type that directly into the field here and then click on OK. And again, because I'm on the style.css file that remains but here's my header.php file, and all the other files are gone, and once I select that style.css goes away. Now if I wanted to work with a series of files, I can easily do that through the Custom Filter option as well.
Let's reopen it, again go to the Filter icon, choose Custom Filter, and right after header.php I'm going to put in a Semicolon and enter in style.css. I'll click OK, and there's our two files. And this time when I click on style.css it shows up, and if I switch back to header, style.css is still available to me. The Custom Filter option also allows you to use wildcards.
So let's say I want to look for a file called footer, but I'm not sure if it's footer.php or wp-footer or some other file name. So I'm going to reopen Custom Filter again. Add another Semicolon after style.css, and this time I'm going to put in Asterisk which is the wildcard, footer, and then follow that with another Asterisk so that will get any file that has footer in its name. I'll click on that and here we see a couple of footer files have shown up footer.php and sidebar-footer.php.
And now when you're ready to go back to seeing all the file types just simply click on the Filter icon one last time and choose Show All File Types. Now that you know how to filter through the related files, it makes using these dynamically-related files as a whole lot easier, doesn't it?
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.