• I’m trying to show only the title on a specific category page, but the function does nothing at all….

    Please help ??

    function replace_content( $output) {
    if (is_category(‘9’)) {
    return ” ;
    }
    }
    add_filter( ‘get_the_excerpt’, ‘replace_content’ );

    Mahalo !!! (Thanks)

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • your link to the category archive is to a category with the ID 13:

    <body class="archive category category-organization-of-conferences category-13 wp-custom-logo oceanwp-theme sidebar-mobile has-sidebar content-right-sidebar no-header-border default-breakpoint has-breadcrumbs">

    have you tried to use the category slug in the code;
    https://developer.www.ads-software.com/reference/functions/is_category/

    try the corrected code which seems to work in general;

    function replace_content( $output) {
    if (is_category('13')) {
    return '' ;
    }
    }
    add_filter( 'get_the_excerpt', 'replace_content' );
Viewing 1 replies (of 1 total)
  • The topic ‘Remove Excerpt from Specific Category page’ is closed to new replies.