• Resolved Gravitate

    (@gravitate)


    Was wondering if there is any ability to remove pages by page template server side. The code below shows an implementation that we attempted based on your filter_title_link filter.However, it still renders the HTML elements on the page for the removed items. Any help would be most appreciated. Thanks!
    Gravitate Dev Team

    function filter_title_link( $title_link, $post_id ) {

    $template_slug = get_page_template_slug($post_id);

    if ( $template_slug === ‘page-test-template.php’) {
    $template_link = ‘<span class=”template”></span>’;
    $title_link = $template_link;
    } else {
    $title_link = $title_link;
    }

    return $title_link;
    }
    add_filter( ‘simple_sitemap_title_link_text’, ‘filter_title_link’, 10, 2 );

Viewing 1 replies (of 1 total)
  • Plugin Author David Gwyer

    (@dgwyer)

    There’s no way to do that right now. As it’s an edge case it’s unlikely to be added anytime soon. The only way you could do it is to modify the code manually.

Viewing 1 replies (of 1 total)
  • The topic ‘Remove Pages by Template’ is closed to new replies.