WordPress.org

Support

Support » Plugins and Hacks » All in One SEO Pack » [Resolved] make page titles shorter for posts

[Resolved] make page titles shorter for posts

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Peter Baylies

    @pbaylies

    Joe,

    This is possible by filtering the title; try adding the following code into a plugin or in the functions.php of your theme:

    add_filter( 'aioseop_title', 'joe_aioseop_shorter_title' );
    
    function joe_aioseop_shorter_title( $title ) {
        global $aiosp;
        if ( !empty( $aiosp ) ) {
            $title_length = 50;
            if ( strlen( $title ) > $title_length ) $title = $aiosp->trim_excerpt_without_filters( $title, $title_length ) . '...';
        }
        return $title;
    }

    Thanks! This worked great 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] make page titles shorter for posts’ is closed to new replies.
Skip to toolbar