Out of the box, the content query web part can only get items from one content type, but what happens if you want it to display items from more than one content type? You don't have to write a custom web part to do this thanks to Microsoft adding overrides in their content query web part.
First, build the CQWP (Content Query Web Part) with everything how you want it, including the query, then you will need to export it to a location on your drive. To export the web part, navigate to the page that contains the web part. Open up the page in edit mode and on that page, click on the edit drop down menu for the web part and click "Export."

Save the file locally. Once you have exported the web part as a .webpart file, open it with notepad and edit the ListsOverride property.

If you want to get everything based on a Generic List (BaseType = 0), you would use the following property:
<property name="ListsOverride" type="string"><![CDATA[ <Lists BaseType="0"> </Lists>]]></property>

If you want to get everything based on a document library (BaseType = 1), you would use the following property:
<property name="ListsOverride" type="string"><![CDATA[ <Lists BaseType="1"> </Lists>]]></property>
Once you have finished editting the webpart, save the file. Now we have to import the new .webpart file. To do this, go to "Site Actions" -> "Site Settings" -> "Modify All Site Settings" on the top level site.
Under "Galleries", click on "Web Parts". Now click the "Upload" button.

Click on the "Browse" button and select the .webpart file that you made changes to.

Now set all of the properties for the webpart and click "OK" when finished.

Now browse to the page you want to add the web part to. Open up the page in edit mode and in the web part zone where you want to add the web part, click on "Add a web part" and select your new webpart and then click "Add."

How to: Customize the Content Query Web Part by using Custom Properties
http://msdn2.microsoft.com/en-us/library/aa981241.aspx
Filed under: Uncategorized