Using the plugin with WordPress shortcodes

A shortcode is a WordPress-specific code convention that lets you conveniently embed website functionality.

Read this for more on what is a shortcode and how to use the shortcode block in the WordPress Gutenberg editor.

The My Movie Database shortcode is [my_movie_db].

  • The basic parameters that you need to set are id and type.
  • Optional parameters to override the global plugin settings are : template, size, body (background color), header (background color), body_font_color and header_font_color.

The shortcode [my-movie-db] also works at the moment but will be removed in a future version.

Please change your shortcodes to [my_movie_db] instead.


Basic shortcode parameters


The most important parameter is the id of the movie, tvshow or person info you wish to display. This parameter corresponds to the unique id of the resource at the TMDB website .

You can find the id by searching for the movie, tvshow or person in the respective custom post type edit screen of your WordPress backend or at the TMDB website.

  1. Searching at your custom post type edit screen
  2. Searching at the TMDB website

Once you find the desired id you use it as in the following example: [my_mοvie_db id=yοur_id]

If you don't specify an id, the default id 655 will be used.

This other important parameter corresponds to the type of resource you are looking for.

Possible acceptable values for "type" are:

  • movie
  • tvshow
  • person

For example, if you are looking to display a Tv show your shortcode should look like this:

[my_mοvie_db id=yοur_id type=tvshow]

The default type value is "movie" so if you don't specify the type, the movie type will be used.


Optional parameters for overriding the global settings


Template to use

Current templates available are :

  • tabs
  • accordion

The default value is 'tabs'.

Have a look at the templates demo to see them in action.

So if for example you want to use the accordion template your shortcode will look like this:

[my_mοvie_db id=your_id type=yοur_type template=accordion]

Responsive column widths
Depending on the design of your target page, you can select from a predetermined set of image / column width sizes for the best fit.

The available options are small, medium and large.

  • large
  • medium
  • small

This setting only affects the following multiple column arrangements (lists) that have a responsive grid layout:

  • The cast and crew sections for movies and tv shows (round images).
  • The cast and crew sections for people, as well as seasons section for tv shows (rectangular images).

Have a look at the responsive column widths demo to see these options in action.

So if for example you want to use the large preset size option, your shortcode will look like this:

[my_mοvie_db id=your_id type=yοur_type size=large]

Alternatively, to use the new custom class list option, use a space between space your classes and don't forget to wrap the custom_width value in quotes, like this:

[my_mοvie_db id=your_id type=yοur_type custom_width="first second third"]

Background color for the template 'header' area

The color chosen will be the background color of your tabs and accordion headers.

This setting in combination with the 'body background color' gives 2 color background schemes to your templates.

Note that in the case of tabs, the 'body background color' also affects the headers: the non-active tabs will get the 'body background color'.

Have a look at the color schemes demo for examples of how these colour combinations come together.

So if you want to use #333333 as a header background color, your shortcode will look like this:

[my_mοvie_db id=your_id type=yοur_type size=large header=#333333]

Make sure you use a valid css color. Accepted values are:

RGB format is not supported

Text color for the template 'header' area

The color chosen will be the text (font) color for your tabs and accordion headers.

This setting in combination with the 'body text color' gives 2 color font schemes to your templates.

In the case of tabs, the active tab will get this font color, while the non-active tabs will get the 'body font color'.

Have a look at the color schemes demo for examples of how these colour combinations come together.

So if you want to use #ffffff as a header font color, your shortcode will look like this:

[my_mοvie_db id=your_id type=yοur_type header_font_color=#ffffff]

Make sure you use a valid css color. Accepted values are:

RGB format is not supported

Background color for the template 'body' area

The color chosen will be the background color for your tabs and accordion body - the main content area.

This setting in combination with the 'header background color' gives 2 color background schemes to your templates.

In the case of tabs, the 'body background color' also affects the headers: the non-active tabs will get this color as a background as well (while the active tab will get the 'header background color').

Have a look at the color schemes demo for examples of how these colour combinations come together.

So if you want to use #333333 as a body background color, your shortcode will look like this:

[my_mοvie_db id=your_id type=yοur_type size=large body=#333333]

Make sure you use a valid css color. Accepted values are:

RGB format is not supported

Text color for the template 'body' area

The color chosen will be the text (font) color for your tabs and accordion body - the main content area.

This setting in combination with the 'header font color' gives 2 color font schemes to your templates.

In the case of tabs, the 'body font color' also affects the headers: The non-active tabs will get this font color as well (while the active tab will get the 'header font color').

Have a look at the color schemes demo for examples of how these colour combinations come together.

So if you want to use #ffffff as a body text color, your shortcode will look like this:

[my_mοvie_db id=your_id type=yοur_type body_font_color=#ffffff]

Make sure you use a valid css color. Accepted values are:

RGB format is not supported

Configuration and customization of display

From the plugin options page you can select which sections to display/hide.

See the configuration documentation page for more detailed info.