Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function custom_wp_title() {
- $id = get_queried_object_id();
- $content = get_post($id);
- $html = $content->post_content;
- $doc = new DOMDocument();
- $doc->loadHTML($html);
- return $doc->getElementById('my_title')->nodeValue;// you can change ID here //
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement