MyBB Community Forums

Full Version: How to get URL and title of current page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am setting open graph image and want to show current page title and URL whenever the page shared on social media. I need to put current page URL and title to be displayed on social sites.
I'm looking for this too, have you any news?
Thanks

Nothing, resolved:

<?php
echo 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
?>

in special_postbit_first template, I use PHP and Template Conditionals plugin and PHP is enabled in the posts.