A document library should help readers find the right policy, report or guide without scanning a long page of download links. With Filter Query Block Pro, you can add topic filters and search to a WordPress Query Loop containing one custom post type. The result titles, summaries and links remain ordinary blocks.
This guide uses public document entries, each with a link to its file. It does not query Media Library attachments directly or search inside PDF files. You will search the title, excerpt and content of the WordPress entry instead.
1. Prepare document entries and topics
Use a custom post type already registered by your theme or a separate plugin, such as Documents. Filter Query Block supplies the filters; it does not register this post type for you. For a public library, make the entries publicly viewable and available in the block editor.
Attach a taxonomy such as Document topics to that post type. Standard Categories will also work if your site has attached them to Documents. Create a short, useful topic list, such as Policies, Reports and Guides, then publish at least three document entries assigned to different topics.
Give each entry a descriptive title, a short excerpt and a paragraph explaining what the document contains. Add the PDF or other file with a core File block or an ordinary link in the entry. For example, “Supplier onboarding policy” is more useful to search than “Download 03”. Keep important search words in the entry text, even if they also appear inside the PDF.
2. Make Documents available to filters
Activate Filter Query Block Pro and open its WordPress admin page. Under Post types available to filters, select Documents and save. In Pro, the corresponding section is Tracked post types. Tracking lets the plugin discover the taxonomies and published terms for that content type.
If Documents is missing, check that the plugin or theme registering it is active. Media Library attachments are excluded from the filter catalog, so uploading files alone will not create a selectable Documents source. If a topic is missing, check that it belongs to the document taxonomy and is assigned to a published document entry.
3. Insert the document Query
Create a library page and insert Filter Query Block from the block inserter. Choose Documents as the single post type, select your topic taxonomy and choose a design. Dropdown and list is a useful starting point for a reading library; Buttons and cards suits a short topic list and visual summaries.
After insertion, select the filter bar and open Edit Filter Query. In Content, confirm Documents is the selected post type. If you are adapting an inherited archive Query, turn inheritance off before choosing a specific source. Start with a manageable number of entries per page and retain the core Query Pagination blocks.
4. Configure search and topic choices
In Filters, select the topic control and confirm its taxonomy under Filter by. Use single selection for a straightforward topic chooser. Buttons default to an All option; keep it so visitors can return to the complete library. A dropdown avoids a long row when you have many topics.
Select the Search control. Under Search fields, choose Title, Excerpt and Content to search the document entries broadly, or just Title for narrower matches. Use a label such as “Search documents” and a short placeholder. Keep a Reset control for clearing combined searches and topics.
5. Make each result useful
Edit the core Post Template inside the Query Loop. Show a linked Post Title and a concise Post Excerpt. A Post Date can help readers compare versions, but it represents the entry’s publication date, not a date extracted from its file. Readers can open the document entry and follow its file link.
A static download link inside the repeated template would point every result to the same file. Keep the file link in each individual entry for this setup. Dynamic custom-field links require an appropriate block or implementation; adding a Pro field filter does not automatically create a download button.
6. Check the complete visitor flow
Preview the library, choose Policies and search for “supplier”. Confirm that the expected document remains. Reset should restore the starting list. Then search for an unrelated phrase and check the no-results message. If an expected match is missing, check its publication status, topic assignment and the selected search fields.
Test pagination, open a result and follow its file link. Repeat on a phone; if the design opens a filter dialog, select a topic and choose Apply. Check Cancel and Clear as well. Search and topic filtering operate together, so clear the existing topic before deciding that a search is broken.
What requires Pro?
Free supports the taxonomy-only version of this single-post-type library. Entry-text search requires Pro, which also supports combined post types, compatible custom fields and ACF values. Neither this setup nor upgrading to Pro supplies PDF text extraction. Continue with styling the controls and testing shared links and pagination.