AutoMedia Inserter is a powerful and flexible WordPress plugin that allows you to automatically insert audio, video, or image players into posts based on keywords found in the post title. Ideal for blogs with rich multimedia content such as audio stories, video episodes, or image-based documentation.
๐ Detects keywords in post titles and embeds associated media automatically
๐ง Supports audio, video (MP4, YouTube, Vimeo), and image formats
๐๏ธ Choose media placement: top, center, bottom, or mixed
๐ Inline editing of media entries
โ Remove or temporarily disable entries without deleting them
๐ Import & Export media rules via JSON
๐ฑ Fully responsive admin table layout with live search and pagination
๐พ Data stored safely in WordPress options (no custom tables)
The plugin reads the post title and compares it against a list of keywords defined by the admin. If a match is found, it automatically embeds the associated media (audio, video, or image) directly into the post content at the chosen position.
settings-page.php
)Handles:
Displaying the list of keyword-media rules in a responsive table
Allowing inline edit, disable/enable toggle, and delete
Export to JSON (button with JS handler)
Import from JSON (form with file input)
Live search and per-page filter
Saving the full configuration via POST
Code Explanation:
if (isset($_POST['automedia_submit'])) {
// Sanitizes and saves each entry
$saved[] = [
'keyword' => sanitize_text_field($kw),
'url' => esc_url_raw($urls[$i]),
'type' => sanitize_text_field($types[$i]),
'active' => isset($actives[$i]) && $actives[$i] == '1' ? 1 : 0
];
}
insert-player.php
)Hooks into the_content
and injects the media player based on matching keywords.
add_filter('the_content', function ($content) {
if (stripos($content, $e['keyword']) !== false) {
$media_output .= "<iframe src='{$url}'></iframe>"; // example
}
return $media_output . $content;
});
It supports:
YouTube and Vimeo via iframe
Local videos (MP4, WebM, OGG)
Audio (MP3)
Images (JPG, PNG, etc.)
Disabled entries are skipped.
admin.js
)Handles dynamic admin behavior:
Inline edit, cancel, delete, and disable/enable toggling
Filtering rows based on search input
Pagination logic
JSON export generation
admin.css
)Keeps the admin interface readable and table-like even on mobile, without breaking into block layout:
@media screen and (max-width: 768px) {
.automedia-table {
display: block;
overflow-x: auto;
white-space: nowrap;
}
}
Podcasts: Auto-embed the right episode in matching post
Audio stories: Play a story when title matches
Video lessons or tutorials
Museum image displays by keyword
SEO-enhanced media experience
Nicuศor Gurฤu
WP Plugins URI: https://webmastertool.org/blog/category/wordpress
๐ Download AutoMedia Inserter Plugin