All case studies

WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX

WordpressPhpJavascriptJQueryMySQLCSSHTML

This is a WordPress plugin I built to demonstrate custom plugin development: a Movies custom post type with its own taxonomies, custom fields, shortcode output and AJAX filtering. It works on any WordPress site. Source code: https://github.com/jmguevarra/wp-plugin-postmovies

Problem

Many sites need structured content beyond posts and pages. The goal was a self-contained plugin that: Registers a custom post type with its own taxonomies Stores extra details like year, rating and runtime as post meta Displays the content anywhere using a shortcode Lets visitors filter and sort without page reloads

Solution

The plugin registers a Movies post type with Genre and Keyword taxonomies and custom meta for year, rating and runtime. A [movies] shortcode renders the list using a custom WP_Query loop template. Shortcode attributes turn on filter options — search by title, genre, keywords and order (alphabetical, popularity or date) — and filtering runs through wp-ajax so results update without a reload.

1

Plugin Setup

Created the plugin structure, includes and asset loading.

2

Custom Post Type

Registered the Movies post type with Genre and Keyword taxonomies.

3

Custom Fields

Added meta for year, rating and runtime.

4

Shortcode

Built the [movies] shortcode with attributes for filters and ordering.

5

AJAX Filtering

Implemented wp-ajax handlers and jQuery for live filtering and sorting.

WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX screenshot 1
WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX screenshot 2
WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX screenshot 3
WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX screenshot 4
WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX screenshot 5
WordPress Plugin Development | Movies Custom Post Type with Shortcodes & AJAX screenshot 6

More Case Studies

View all work