If you want to use the Content by Query Web Part (CQWP), you may have noticed this is only available when you have the Publishing Feature enabled.

If you deal with things like evil site templates, you may not want to enable this feature.  In order to successfully use this webpart without the Publishing Feature follow the following steps:

  1. Save the web part from a site that does have the Publishing Feature enabled
  2. Upload it to your new site
    1. Edit the page
    2. Go to Insert > Web Part and under the categories, you should see "Upload a Web Part"
    3. When you upload a web part, you should see it listed in "Imported We Parts" category.
  3. Once you have done this, the next step is copy the Style%20Library/XSL%20Style%20Sheets/*.xsl files from the site with the Publishing Feature enabled across to the current site
    1. The easiest way to do this is to open the Style Library folder with SharePoint Designer 2010 on the current site, and another copy of SharePoint Designer 2010 open with the Style Library folder from the site with Publishing Feature enabled, and then drag and drop the "XSL Style Sheets" folder from one SharePoint Designer 2010 to the other (ignore the error about needing to be checked out).

This will allow you to be able to add the Content Query Web Part to a page on your site without enabling the Publishing Feature.