Home / Archive / Hide WPEX Tetris Read More by Category
Duplicate Snippet

Embed Snippet on Your Site

Hide WPEX Tetris Read More by Category

Hide the WPEX Tetris read more button for a specific category using the wpex_read_more filter. Replace 'blog' with your target category slug, ID, or name (for example, 'portfolio'), set the snippet type to PHP Snippet, and activate. Check an archive or feed page to confirm the button disappears only for that category.

theme requild
https://github.com/WP-Developer-Hub/wpex-tetris

Code Preview
php
<?php
function wpex_filter_read_more_visibility($show_read_more) {
    $post_id = get_the_ID();
    if ($post_id && has_category('blog', $post_id)) {
        return false;
    }
    return $show_read_more;
}
add_filter('wpex_read_more', 'wpex_filter_read_more_visibility');

Comments

Add a Comment