If you wish to embed a SharePoint List in WordPress, you must generate a shortcode using the generator and add it to a page.
Perform the following steps to generate a WP shortcode to embed a SharePoint Library in WordPress.
- Navigate to WP Admin > WPO365 > … > SharePoint / OneDrive List or Library.
Basic configuration options
The basic free version of the embedded SharePoint List is included in the WPO365 | LOGIN plugin that can be downloaded for free from the WordPress Plugins Directory and the WPO365.com website.
- Select A SharePoint List from the Datasources dropdown.
To learn about the other available datasource that you can connect to, check the following links:
- SharePoint Online Library
- OneDrive
- Recent Documents
- Type the hostname of your SharePoint Online home. For example, in our case we enter wpo365demo.sharepoint.com because our SharePoint Online home is https://wpo365demo.sharepoint.com.
- Enter the managed path of the site collection where the list that you wish to embed resides, for example sites/reports.
- Enter the title of the list that you wish to embed. Please note that the title of the library can be found in SharePoint just above the list with documents, for example Available reports and not – for example –
Lists/Available%20reports/AllItems.aspx. - Optionally, you can change the Pagesize. This is the number of items that WPO365 will use to page through the results of query, in case the total number of items is larger than the pagesize.
- Optionally, you can choose to Hide message bar. The message bar is mainly used by the free version of the embedded library, to inform that this version does not support folder navigation.
Advanced premium options
Premium options are unlocked by the WPO365 | M365 APPS addon or the WPO365 | INTRANET bundle.
Please note When you upgrade to benefit of any of the premium options, you must create a new shortcode and replace shortcodes that you created with the free version included in the WPO365 | LOGIN plugin.
- Folder navigation (= breadcrumb navigation) will be enabled by default and does not require further configuration.
- Optionally, you can enable users that do not have an enterprise account in your Microsoft Entra ID / Azure AD to view items in the embedded SharePoint Library by checking the option to Allow anonymous users. Please note, however, that this requires additional configuration. See Advanced | Access for “anonymous” users.
- Optionally, you can Use query string for configuration. If checked, you can “inject” the configuration of the app’s hostname, server relative path, library title and folder by means of a dynamically assembled query string. Refer to the example below to understand how to build the query string.
https://your-wordpress-website/page-with-embedded-app/?serverRelativePath=sites%2Fcontoso&listTitle=Documents&libraryRelativeFolderPath=General%2FCollateral
- Optionally, you can edit the Columns that the block will display and can connect each of those columns with a (custom) SharePoint list item field. Please check Advanced | Customize your columns for details.
- Optionally, you can edit Translations to support your own language instead.
- Optionally, you can check the option to Show “Open in SharePoint” link. If checked, a link that will open the embedded library in SharePoint Online will be displayed.
Test your configuration
After you completed your configuration, it’s time to test it by simply clicking Test configuration at the bottom of the generator, followed by the Start test button on new panel that appeared.
Add shortcode to a WordPress page or post
Perform the following steps to add the generated shortcode to a WordPress page or post after you clicked to Copy the short code to clipboard.
- From the WordPress Admin Bar, click + New to add a new WordPress page or post.
- On the page or post, type short code in the block navigator and click the short code shortcut to add a new short code block to the page or post.
- In the short code editor, click Ctrl+V (or right mouse click and click Paste) to paste the short code.
- Publish the page and then click View post to check the result.