Hi, I’ve been trying 2 methods and they both don’t work properly:
- using wixSeo:
import wixSeo from 'wix-seo';
let title = wixSeo.title; // "Page Title"
- using the $ selector:
let myTitle = $w("#myPage").title; // "Page Title"
These methods doesn’t work if you’re in a specific blog post (I just get this value: “Post | MyWebsiteName”), or when using a lightbox (I get the lightbox’s name instead of the page I’m in).
I can’t seem to get the title that’s currently displayed in the browser’s tab unless I’m in a static page.
Any solutions?
Thanks in advance,