1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. FAQ

How does the single document page work?

Whenever you add a document using the Document Library Pro plugin, an individual page is automatically created for that document.

Page content

Single document page
An example of the single document page in the Storefront theme

You can display the following information on the single document page:

Details Location Optional?
Document title The name of the document Top of main column No
Document content The main description for the document Main column No
Featured image The document's featured image Sidebar Yes
Comments Shows all the comments on that particular document Below main column Yes
Categories The categories associated with the document Sidebar Yes
Tags The tags associated with the document Sidebar Yes
Authors The name of the document author Sidebar Yes
File size The size of the file Sidebar Yes
File type The file format Sidebar Yes
Filename The file name Sidebar Yes
Custom fields Any custom fields which you have added to the document. Sidebar Yes
Download count The number of times the document has been downloaded Sidebar Yes

You can use the plugin settings page to show and hide any of the fields which are labelled as 'Optional' in the table above.

The document details in the right hand column will only appear if you have enabled these fields and added information to them for the document.

How to access the single document page

You can access the page for each document as follows:

  • From the front end - If links to the single document page are enabled in the plugin settings, then you can click on any document to access it.
  • From the WordPress admin - Click on the Documents link in the left of the WordPress admin, hover over a document and click the 'View' link.

Disable the single document page

If you don't want to use the single document page, then you should set the Link Destination option to 'direct' and set the clickable columns option to 'none'. This means that users will be taken directly to the document download link (or other URL if you have entered a custom link for the document), instead of being taken to the single document page first.

FAQ

Can I add download and preview buttons?

The single document page will display the same download and preview buttons that appear on the main document library pages. These are managed via the plugin settings page.

Can I restyle the page or customize the layout?

Document Library Pro automatically uses the appropriate page template from your theme and filters out extra details and adds the extra information about each document. This ensures compatibility with any theme.

You (or your developer) can change it by creating a custom template which overrides the template built into the plugin. Further instructions as well as an example template for this are available here.

The styling of the wider page is inherited from your theme - for example, the font sizes and colors, and whether or not it has a sidebar. We have provided a list of CSS selectors which you can use to change the styling. If you don't know how to use them then you can use our plugin customization service.

Can I add sidebar widgets?

Yes - if the default page template in your theme has a sidebar, then any widgets will appear in the sidebar as usual.

You can use a free plugin such as Custom Sidebars or Easy Custom Sidebars to create a dedicated sidebar for the document post type. This is useful if you want the document posts to have different widgets from your other pages.

Can I change the width of the sidebar?

Where possible, Document Library Pro will display the document details in the sidebar which is provided by your theme. This means that this section will be the same width as the other sidebars on your site.

If your theme doesn't provide a sidebar then Document Library Pro will display the document details as a floating box on the right of the document content. You would need to use custom CSS to change the width of this.

You can change the permalink structure of your document library from General settings → Document Slug. Learn more about changing the document slug.

A large image or date is appearing at the top of the page!

The default template in most themes displays the featured image full-width at the top of the page. We understand that you may not want this for document pages, so Document Library Pro attempts to prevent the featured image from displaying in the default location where possible. Instead, the plugin displays the featured image in a smaller location on the right hand side, under the download button and other document date.

Unfortunately, some themes are coded in a way that prevent this from working correctly. For example:

  • Themes such as Atelier, Divi and JupiterX don't use the default WordPress functions to output the image and have their own custom functions instead, which force the image to be displayed at the top.
  • Some themes overlay a date box over the image at the top. Since we have hidden the image, this can mean that a date floats over the content.

If this happens in your theme then you have the following options:

  • Don't add a featured image for your documents.
  • Stop using the single document page (see above).
  • Use the theme options to change where the featured image appears, and disable any unwanted information such as the date.
  • Use custom CSS to customize the layout as required.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.