• I want to set a unique SEO title for a specific url. Can I do it without any plugins? I’m already using All In One SEO Pack, but they don’t have that option (at least in the free version I’m using).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    SEO plugin is needed for something like this unfortunately.

    Maybe try Yoast? Not sure if they have this option in the free version either.

    Theme Author Tom

    (@edge22)

    Hi there,

    You should be able to use a filter like this if you can’t use a plugin:

    add_filter( 'document_title_parts', function( $title ) {
        if ( is_page( 'your-page-slug' ) ) {
            $title['title'] = 'Your custom title here';
        }
    
        return $title;
    } );

    You would just need to replace the your-page-slug with the slug of the page you’re targeting, and of course the Your custom title here part with your title.

    A plugin like Yoast makes this kind of thing much easier 🙂

    Thread Starter orange438

    (@orange438)

    Thanks, Tom! This looks like exactly what I need, but unfortunately it doesn’t seem to work for 4.7.12. When I put the code into functions.php it still displays the old title instead of the new one.

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    What is it you’re trying to do that isn’t part of All in One SEO Pack?

    You can set the SEO title for any post in the AIOSEOP section: https://semperplugins.com/documentation/post-settings/

    There’s also a filter hook https://semperplugins.com/documentation/aioseop_title/

    Theme Author Tom

    (@edge22)

    Thanks, Michael! That looks like a much easier solution 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘SEO Title for a specific URL without plugins’ is closed to new replies.