- Change footer text
- Default dark mode
- Disable mode switch button
- Replace UIkit icons
- Insert heavy ads (hidden for VIP)
- Increase number of chapters displayed in manga card (default 2)
- Automatically unlock “Coin” chapters for VIP
- Change the “Chapter” label and separators
- Hide the chapter subtitle (for tighter titles)
- Fully override the final page title (complete control)
- Customize the meta description (short, conversion-oriented)
- Completely disable the SEO module for chapters
- Increase temporary unlock cost (VIP Days)
- Disable Google AdSense for VIP Users (Advanced)
- Prevent Authors from deleting chapters or posts
- Add a Simple Custom Question for the Assistant
- Conclusion
Change footer text
This snippet allows you to change the default Init Manga footer content, for example by adding your site name or a thank-you note.
add_filter('init_manga_footer_text', function ($text) {
return '© ' . current_time('Y') . ' My Custom Site · All rights reserved.';
});
Default dark mode
You can set the default color mode to auto, dark, or light with just a small filter.
add_filter('init_manga_default_color_mode', function () {
return 'dark'; // auto | dark | light
});
Disable mode switch button
If you have fixed the light/dark mode, you can completely disable the switch button to keep the interface cleaner.
add_filter('init_manga_disable_theme_mode_toggle', '__return_true');
Replace UIkit icons
You can replace default icons with your own SVGs, for example for Coin, Cash, or Power Stone.
<script>
document.addEventListener("DOMContentLoaded", () => {
UIkit.icon.add('database', '<svg>...</svg>');
UIkit.icon.add('credit-card', '<svg>...</svg>');
UIkit.icon.add('lifesaver', '<svg>...</svg>');
});
</script>
Insert heavy ads (hidden for VIP)
The snippet below allows you to insert heavy ad scripts, but will automatically skip if the user is VIP. Very useful to protect the experience of paying users.
function init_manga_ads_non_vip() {
if ( function_exists('init_plugin_suite_user_engine_is_vip')
&& init_plugin_suite_user_engine_is_vip() ) return;
?>
<div id="im-heavy-ads"></div>
<script>
// Paste heavy ad / anti-adblock script here
</script>
<?php
}
add_action('wp_footer', 'init_manga_ads_non_vip', 20);
Increase number of chapters displayed in manga card (default 2)
By default, init_manga_get_manga_chapters_bulk() uses argument 2. You can override it with the filter below (e.g. change to 4). Adjust the number based on your server resources and actual needs.
add_filter('init_manga_get_manga_chapters_bulk_arg', function ($arg, $manga_ids) {
// Change to 4
return 4;
}, 10, 2);
Automatically unlock “Coin” chapters for VIP
You can let VIP members read Coin-locked chapters for free. The filter below only applies to lock type coin, leaving other lock types untouched.
add_filter('init_manga_bypass_coin_lock', function ($bypass, $user_id, $chapter, $manga) {
// Only proceed if logged in
if (! $user_id) return false;
// Only target "coin" lock
$lock_type = $chapter['lock_type'] ?? 'none';
if ($lock_type !== 'coin') return $bypass;
// Use Init Plugin Suite VIP function if available
if (function_exists('init_plugin_suite_user_engine_is_vip')) {
if (init_plugin_suite_user_engine_is_vip($user_id)) {
// VIP → bypass coin lock
return true;
}
}
// Otherwise keep previous decision
return $bypass;
}, 10, 4);
Change the “Chapter” label and separators
Note: The filters below apply specifically to Chapter SEO, including the page title and meta description, and they integrate with both Core WP and major SEO plugins.
You can replace “Chapter” with “Ep.” and customize the separators between parts of the title/site.
// Change "Chapter" to "Ep."
add_filter('init_manga_chapter_label', function ($label, $manga, $chapter) {
return 'Ep.';
}, 10, 3);
// Use a different separator between parts
add_filter('init_manga_title_separator', function ($sep, $manga, $chapter) {
return ' | ';
}, 10, 3);
add_filter('init_manga_site_separator', function ($sep, $manga, $chapter) {
return ' • ';
}, 10, 3);
Result example:
Manga Title | Ep. 123: Subtitle • Your Site
Hide the chapter subtitle (for tighter titles)
If you want to remove the “: Subtitle” part for a cleaner title, use this filter:
add_filter('init_manga_include_chapter_title', function ($include, $manga, $chapter) {
return false; // don’t append ": Subtitle"
}, 10, 3);
Fully override the final page title (complete control)
When you need total control over the title, you can return your own final string. This value is injected into both Core WP and popular SEO plugins.
add_filter('init_manga_full_title', function ($full, $ctx) {
$manga = $ctx['manga'];
$chapter = $ctx['chapter'];
$site = $ctx['site'];
// Example: "Manga Title — Read Chapter 123 Now | Your Site"
return sprintf(
'%s — Read Chapter %s Now | %s',
get_the_title($manga),
$chapter['number'],
$site
);
}, 10, 2);
This value will feed into:
- Core WP:
pre_get_document_title,document_title_parts - Rank Math:
rank_math/frontend/title - Yoast:
wpseo_title - SEOPress:
seopress_titles_title - AIOSEO:
aioseo_title
In short: whatever you “force” here becomes the visible title everywhere.
Customize the meta description (short, conversion-oriented)
You can format your description with a custom template; the system will auto-trim to ~160 characters.
add_filter('init_manga_chapter_meta_desc', function ($desc, $manga, $chapter) {
$manga_name = get_the_title($manga);
$chapter_no = $chapter['number'];
$chapter_name = trim((string) ($chapter['title'] ?? ''));
// Example template
$base = $chapter_name !== ''
? sprintf('%s – Chapter %s: %s. Read free, fast loading, no fluff.',
$manga_name, $chapter_no, $chapter_name)
: sprintf('%s – Chapter %s. Read free, fast loading, no fluff.',
$manga_name, $chapter_no);
return $base; // will be auto-trimmed to ~160 chars
}, 10, 3);
Completely disable the SEO module for chapters
If you want to fully disable the SEO features for chapters (for example, to prevent generating custom meta tags, schema, or canonical URLs for each chapter), you can use the following filter:
add_filter('init_manga_disable_chapter_seo', function ($disable) {
return true; // completely disable the SEO module for chapters
}, 10);
Note: The Rank Math SEO plugin supports SEO optimization for individual chapters. If you prefer to use Rank Math, you should apply this filter to disable the theme’s default SEO module to avoid duplicate meta or canonical tags.
Increase temporary unlock cost (VIP Days)
By default, the temporary unlock cost for a VIP Days chapter is calculated at 100 Coins/hour. You can change this value using the filter below, for example increasing it to 250 Coins/hour.
add_filter('init_manga_vipdays_coin_rate_per_hour', function ($rate) {
// Change default from 100 → 250 Coins/hour
return 250;
});
Disable Google AdSense for VIP Users (Advanced)
By default, Init Manga already includes a filter to block the main Google Site Kit AdSense script for VIP users. However, if you are using the Advanced Ads feature, individual ad units may still be printed. The code snippet below will completely block all AdSense ads for VIP users with two layers of protection: blocking from the source (filters) and cleaning up the output (buffer).
// Buffer all output to remove ads
add_action('template_redirect', function() {
if ( ! function_exists('init_plugin_suite_user_engine_is_vip') ) {
return;
}
if ( init_plugin_suite_user_engine_is_vip() ) {
ob_start(function($buffer) {
// Remove adsbygoogle.js script
$buffer = preg_replace('/<script[^>]*pagead2\.googlesyndication\.com[^>]*>.*?<\/script>/is', '', $buffer);
// Remove ins adsbygoogle
$buffer = preg_replace('/<ins[^>]*adsbygoogle[^>]*>.*?<\/ins>/is', '', $buffer);
// Remove script push adsbygoogle
$buffer = preg_replace('/<script[^>]*>\s*\(adsbygoogle\s*=\s*window\.adsbygoogle.*?<\/script>/is', '', $buffer);
return $buffer;
});
}
}, 1);
Prevent Authors from deleting chapters or posts
If you want to restrict the delete permission for users with the Author role (for example, to prevent accidental deletion of chapters or published manga), you can use the following snippet:
// Prevent Authors from deleting chapters
add_filter('init_manga_can_delete_chapter', function($can_delete, $chapter, $user_id) {
// If the user has the Author role → disallow deletion
if (user_can($user_id, 'author')) {
return false;
}
return $can_delete;
}, 10, 3);
// Remove all delete capabilities from the Author role
add_filter('user_has_cap', function($caps, $cap, $args, $user) {
// If the user is an Author → remove all delete permissions
if (isset($user->roles) && in_array('author', $user->roles, true)) {
unset($caps['delete_posts']); // Cannot delete drafts
unset($caps['delete_published_posts']); // Cannot delete published posts
unset($caps['delete_private_posts']); // Cannot delete private posts
}
return $caps;
}, 10, 4);
Add a Simple Custom Question for the Assistant
If you want to extend the Init Manga Assistant with your own quick replies (without editing core code), you can easily do it using a filter.
The following snippet adds a new question “Who made this site?” that simply returns a custom text response.
// Register a custom question
add_filter('init_manga_assistant_questions', function ($items) {
$items[] = [
'key' => 'site_author',
'desc' => __('Who made this site?', 'init-manga'),
'handler' => 'init_manga_handle_site_author',
'type' => 'text', // return plain text
'category' => 'about',
];
return $items;
});
// Handler: returns a simple text response
function init_manga_handle_site_author($payload) {
return __('This site was created by the Init HTML team.', 'init-manga');
}
Conclusion
These additions help you: adjust batch chapter processing size for performance optimization, and grant VIP users free access to Coin-locked chapters, etc. Combined with the UI and ad snippets, you now have a “compact yet powerful” toolkit. Choose only the snippets you really need and test thoroughly before applying in production to ensure performance and user experience.
Comments