title( )


Gets the page's title.

The title is an important factor that lets search engines determine the topic of a page.

Note: You should always invoke the wixSeoFrontend.title getter outside of the onReady() event handler to ensure receiving the proper response.

Method Declaration
Copy
function title(): Promise<string>;
Request
This method does not take any parameters
Returns
Return Type:Promise<string>
Get the SEO title
JavaScript
import { seo } from "@wix/site-seo"; import { createClient } from "@wix/sdk"; import { site } from "@wix/site"; const wixClient = createClient({ host: site.host(), modules: { seo }, }); // ... let title = await wixClient.seo.title(); // "Page Title"
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?