WordPress
Integrate BeyondWords with WordPress
Overview
WordPress publishers can use the BeyondWords plugin to publish audio articles directly from WordPress.
Installation
Install and configure the BeyondWords WordPress plugin
Generate Audio
Create audio for new and existing posts
Video Player
Use the video player style
Headless Mode
Use the plugin in headless mode
Languages
Configure multiple languages
Shortcode
Position your player with shortcodes
Categories
Control audio generation by category
Sidebar
Access advanced audio options
Inspect Panel
Manage BeyondWords data
Site Health
Share site information for support
Compatibility
Plugin and theme compatibility
WPGraphQL
Access BeyondWords data with GraphQL
Upon publishing, each new post is automatically processed into audio, which will then populate the player at the top of the post once the audio is complete.
These guides are applicable for version 5.0.0 of the plugin or higher.
To get started, you’ll need to have set up a BeyondWords account and to install the BeyondWords plugin.
Once you’ve created an account in BeyondWords, and created a new project, you can get started by installing the BeyondWords plugin.
Install the plugin
Locate BeyondWords plugin
In your WordPress admin dashboard, go to the plugin marketplace and search for BeyondWords.
Locate plugin
After downloading, you can find the plugin in the Installed Plugins section on your WordPress dashboard.
Fill in the credentials
Enter your API Key and Project ID.
You can find these in Project > Settings > Integrations > WordPress.
Save changes
Once done you can save your changes.
You’re now ready to begin publishing!
Once activated, the plugin will automatically generate audio for new posts as you publish them.
If you have existing posts you’d like to convert into audio, you can generate audio for those posts as well.
Generate audio for new posts
Ensure the plugin has been installed
Publish your post
If the plugin has been installed correctly you should now have a Beyondwords panel in the WordPress Sidebar.
By default Generate Audio is preselected, you can uncheck this if you do not want to generate audio for a particular post.
Audio generation
Once you hit publish the text from the post will be submitted to BeyondWords and the audio will begin to generate.
You can track its progress in the BeyondWords dashboard. The time it takes to generate audio depends on the length of the article but it usually only takes a couple of minutes.
Once the audio is generated, you’ll be able to listen to your new audio by clicking on the play
button next to the title. For more tips on using the dashboard and editor, visit The Editor section in our documentation.
Displaying the player
Once your audio is sucesfully generated the BeyondWords Player will then appear on the front end of your post.
The Player is customizable through the BeyondWords Settings and the Plugin Settings, and both will sync seamlessly with each other.
Generate audio for past posts
All Posts
Navigate to the All Posts section in the WordPress dashboard.
Here, you’ll see a tick next to any posts that have generated audio.
Previous posts
Select all the previous posts you want to generate audio for.
Then, choose Generate Audio from the Batch Actions dropdown menu and click Apply
.
Audio generation
The selected posts will be sent to the BeyondWords dashboard to begin audio generation. Once the audio is generated, the player will automatically appear on your front end.
Video player
If the Video option is disabled in your Player style dropdowns please email us at support@beyondwords.io to discuss enabling it for your project.
Only sites using the latest player can select the “video” player style. Not using the latest player? See Updating to the latest player.
Use the video player style for a single post
The video player style can be set for each individual post on the post edit screen.
In the BeyondWords panel (Block editor) or the BeyondWords meta box (Classic editor), select Video in the Player style dropdown menu:
Set video as the default player style
To apply the video player style to all your future posts by default, set Video as the Player style in the BeyondWords plugin settings page:
Replace the “Featured image” with a video player
Every WordPress theme has specific HTML elements and CSS styling, so there is unfortunately no single method to reliably replace the Featured image with a BeyondWords video player that will work for all themes. To achieve this you can make use of our WordPress filters to apply the relevant HTML and CSS for your specific theme.
An example of the required steps is provided below, using a standard BeyondWords install on a WordPress site using the Newspack theme.
Step 1: Create a test post
Create a test post with a Featured image and Player style set to Video. When you view this post you should see a video player displayed in the default position – in-between the featured image and the post body. The video should have the featured image as the default video placeholder.
Step 2: Hide the default player
Hide the default auto-prepended player for posts with a Player style of Video with the following filter:
Step 3: Note the CSS classes applied to the featured image
Your featured image will likely have some CSS classes to style the img element, or a wrapper element. Inspect the HTML of the featured image and make a note of any classes or IDs.
In our example, we note down the HTML tags and CSS classes of both the wrapper figure element and the img element:
Step 4: Replace the featured image with a video player
Use the WordPress post_thumbnail_html filter to replace the Featured image with the BeyondWords shortcode.
View the post again and you should see a video player, although it may currently lack the CSS styling it needs to display it like a featured image.
Step 5: Apply CSS classes to the video player HTML
Modify the code above to add any required HTML tags and/or CSS classes to a wrapper element.
We decided to add img CSS classes we noted earlier into a div wrapper element:
View the post again and inspect the HTML. You should see that the player is now wrapped in the div element we have defined.
Continue to apply any required HTML wrapper elements and CSS classes to the shortcode to style it like a featured image.
You may find that you need to add custom CSS selectors and HTML classes to style the video player as intended. To do this, enqueue a CSS file using the WordPress wp_enqueue_styles action and specify the class names into your wrapper element.
Step 6: Optionally repeat steps 2-5 for all your featured image sizes or positions
Some themes, including the Newspack Theme, add options which allow you to set the position/size of the Featured image for each post.
If your site displays featured images in multiple positions/sizes you should repeat the steps above, testing the presentation of the player against all the relevant options.
Headless mode
The BeyondWords plugin now includes a headless mode, meaning a publisher can take advantage of audio processing and the audio CMS whilst building their own front-end players.
To change to headless mode, head to the plugin settings at Settings > BeyondWords.
In the Player UI dropdown select Headless to use the player in headless mode, or select Disabled to entirely disable the front-end player (the admin player will still appear so you can review any processed audio).
Once in headless mode you can build your own UI on top of the player.
Add languages
From version 4.0.0 you can select the language and voice to use for each of your WordPress posts.
The default language and voice for your project is set in the BeyondWords dashboard, and optional secondary languages are set in the BeyondWords plugin settings in WordPress. These secondary languages, and their voices, will be available to select whilst you are editing your posts.
This allows for publishing in multiple languages from one domain and from one BeyondWords project.
Set secondary languages
Head to the plugin settings at Settings > BeyondWords.
Under the Content settings section add your secondary languages in the Languages field and click Save Settings.
Switch languages in the editor
Once new languages are set you can switch languages in the sidebar of the editor.
Select the language and select a voice and you’re ready to publish!
WordPress shortcode
Position your BeyondWords Player anywhere on the page using our WordPress shortcode.
A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut. Learn more about WordPress shortcodes.
By default our BeyondWords Player is automatically prepended to the body content of each post or page. If our shortcode is detected anywhere in the WordPress content (the_content
) then we prevent the automatic prepending of our default player and instead display the BeyondWords Player where you have placed the shortcode.
Using our shortcode
Block Editor
Add the shortcode [beyondwords_player]
into a shortcode block to define a custom location for the audio player in the WordPress Block Editor.
Classic Editor
For the WordPress Classic Editor, type the [beyondwords_player]
shortcode anywhere in your WordPress content. For example:
PHP
The WordPress do_shortcode
function can be used to output a player in PHP.
Our shortcode will only function whilst running inside The Loop, because each BeyondWords Player needs to access the audio data we store in the beyondwords_content_id
and beyondwords_project_id
custom fields.
If you would like to display BeyondWords Players outside of the The Loop then please email the details of your use case to support@beyondwords.io.
Generate audio by category
You can choose to have the Generate audio checkbox in the editor deselected by default for certain categories.
Access category settings
Head to the plugin settings at Settings > BeyondWords.
Uncheck Posts and you’ll see a list of your categories below.
Select categories
Check the categories for which you want to automatically generate audio.
Assigning any of the categories you check here to a new post will check the Generate audio checkbox on the post edit screen automatically.
BeyondWords sidebar
Access advanced audio options for each post in the BeyondWords Sidebar.
The BeyondWords Sidebar for the Block Editor is toggled using the audio icon in the top right of the post edit screen.
The sidebar includes the following panels:
Status
Control the audio status and the onscreen presentation of the player using the Status panel. If audio has been generated you can also preview the audio here.
Help
Access our support guide or email our support team using the links in the Help panel.
Inspect
View, copy and remove BeyondWords audio data using the Inspect panel. Refer to the Inspect panel documentation for more details.
Inspect panel
Our Inspect panel on the post edit screen allows you to view, copy or remove the BeyondWords data we store in WordPress for each post.
Access the Inspect panel
Block Editor
You can find the Inspect panel at the bottom the BeyondWords Sidebar. If it’s closed (with the arrow pointing down) then click on the panel title to open it.
Classic Editor
Enable or disable the BeyondWords: Inspect panel using the Screen Options.
Managing BeyondWords data
We provide controls at the bottom of the Inspect panel to manage linked audio data.
Copy
Use “Copy” to copy the BeyondWords audio data in text format.
Pasting this data into a support request enables us to see exactly what audio data has been saved for a particular post.
Remove
Use “Remove” to remove the audio data from the post – to delete all BeyondWords custom fields from your post. Recent versions of our WordPress plugin will also attempt to delete the audio from your BeyondWords dashboard, to keep WordPress and your BeyondWords dashboard in sync.
To prevent accidental deletion, after pressing “Remove” you will then need to save your changes to the post. The audio data will not be removed until the post has been updated.
Copy site health
To help our team debug any issues, or respond to your queries, please send us your WordPress site health information.
Access Site Health
In the left-hand sidebar of your WordPress admin dashboard, select Tools > Site Health.
Copy site information
Once in the Site Health panel, click on the Info tab.
Click Copy site info to clipboard and append this to your support query.
This information helps our support team better understand your WordPress environment and resolve issues more efficiently.
Plugin & theme compatibility
We are compatible with most other plugins and themes that you may have installed on your WordPress site. You will usually not need to do anything to use our plugin with the other plugins/themes of your site.
This section includes supporting documentation for plugins/themes that we aim to be compatible with, and any steps that you will need to take to ensure compatibility when we could not provide it automatically.
If you have a question regarding compatibility with plugins/themes, or you are a plugin/theme developer who would like to ensure compatibility, then please email us at support@beyondwords.io.
Newspack
The Newspack Theme adds some non-standard fields into the WordPress edit screens and presents the values in the theme template files. These custom fields are not be passed to our API by default, but you can send them to us using a WordPress filter.
Include Newspack custom fields in your audio content
If you want the Newspack Subtitle, Summary title and Summary body to be included in your audio content then you can use the beyondwords_content_params
WordPress filter to send them to us.
You can optionally include additional standard WordPress content that your theme may display, such as the author name and the article publish date, by integrating the code above with the Example 1 from our beyondwords_content_params WordPress filter documentation.
WPGraphQL
For WordPress sites using WPGraphQL, the BeyondWords project ID and content ID are available as fields at the following locations:
beyondwords.projectId
beyondwords.contentId
You can use the values of these fields to embed an audio player using one of our Player SDKs.
Sample GraphQL Query
Retrieve the post title and the BeyondWords data for your posts.
Query
Example response
For legacy support we provide a 3rd field beyondwords.podcastId
with the same value as contentId
. If you are currently using podcastId
then please update your application to read contentId
instead. The podcastId
field is deprecated and it will be removed in plugin version 5.0.