1. Take the embed code from Portal > Embed and copy the code inside the <script></script> tags (not including the tags themselves). Paste it into a plain text file.
2. Save the file in the folder where you installed WordPress (or in a scripts folder within that), with a name like deskpro-embed.js.
3. In WordPress, edit the page or post where you want the embed. Make sure you're editing in text mode.
4. Enter any code from the original embed that was before the <script> element (this only applies if you're embedding a contact form or the entire helpdesk). Then enter a script element which references the file where you saved the script in step 2:
You will need to modify the src element depending on how you installed WordPress and where you saved the file in step p2; you may need to use src="/blog/deskpro-embed.js", src="/scripts/deskpro-embed.js" etc.
For example, this is the code you would enter to embed your whole portal:
<!-- DeskPRO Helpdesk Embed -->
<div id="dp_helpdesk" style="display: none;"></div>
<!-- /DeskPRO Helpdesk Embed -->
5. View the page/post. If your embed doesn't show up:
- go back to editing the page and check that the code was saved correctly. If you find that the src element is being stripped out, go to Users > Your Profile and select Disable the visual editor when writing.
Note that some Wordpress themes with fixed widths aren't wide enough to display the full portal. If the portal content is cut off at the right, you may need to modify or change your theme.