Hi guys. I'm new at Magento. I'm going to make open graph meta tags inside the head tag. I made a custom phtml. I want to put title (og:title) and description (og:description) there. I have no idea how to make it dynamic. I want to make it the same as the current. Any variable to use? Thanks.
You can add dynamic title and description using custom phtml file,
Create Static block and call static block from phtml file,
Call static block from Phtml file
Now you need to add your graph meta tag into Content -> Element -> Block
Call Block identifier using phtml file as per above link
I just want to make og:title is the same as the title by system and og:description is the same as the description by title. Could I do that in default_head_blocks.xml? How to access the title and the description variable and put them in default_head_blocks.xml? Thanks.