• Resolved Mike Ciffone

    (@mikeciffone)


    I’m trying to remove the prefix from an archive page title but the methods of normally doing this within WordPress are not working. For instance:

    /**
    *
    * Remove "Topic: " from CPT "topic" archive page titles
    **/
    function clean_tax_page_title($title) {
        if (is_tax('topics')) {
            $title = single_cat_title('',false);
        }elseif ( is_post_type_archive('topics') ) {
            $title = post_type_archive_title( '', false );
        }
    
        return $title;
    }
    add_filter('get_the_archive_title', 'clean_tax_page_title');
    add_filter( 'get_the_archive_title_prefix', '__return_false' );

    I would expect that code to remove “Topic: ” from the archive page <h1>, however, it does not.

    Does Elementor not use the_archive_title() ? Or could it be a priority issue?

Viewing 1 replies (of 1 total)
  • Plugin Support vipul78

    (@vipulelementor)

    Hi there,

    Regarding your custom code review since this is a development based query, may opt to visit our Github account where you may get in contact with a member of our development team to query this with.

    Please note that this is not an official support channel but a respective member of the development team will respond to your post as soon as they are available.

    Please follow this guide which outlines the steps required to post on our Github: https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md

Viewing 1 replies (of 1 total)
  • The topic ‘Trouble removing the Prefix from taxonomy title’ is closed to new replies.