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.
The single document page is displayed as follows:
- Main column containing the document title and the content/description. If you have enabled links to the single document post then we recommend adding information to the content field for every document.
- Right sidebar containing:
- A button linking to the document
- Featured image
- Download count
- Document author
- Custom fields
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.
You can also use the plugin settings page to show and hide the excerpt, featured image and comments from the single document page.
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.
Restricting information on the single document page
You can easily restrict document details on the single document page by deselecting them from the display list. Here are the options you get:
- Excerpt - Displays the document excerpt
- Featured image - Displays the document featured image
- Comments - Shows all the comments on that particular document
- Categories - Displays the categories associated with the document
- Tags - Displays tags associated with the document
- Authors - Displays the name of the document author (the original creator of the document)
- File type - Shows the file format
- Download count - Displays the number of times the document has been downloaded
- Custom fields - Displays any custom fields which you have added to the document.
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.
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.
Can I change the permalink structure?
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.