theme development – Is there any way to store single.php wordpress file into a php variable
I am finding an way to store single.php file in a variable in wordpress file, I want to use preg_match_all to this file.
$regex = "~(<h([2-6]))(.*?>(.*)<\/h[2-6]>)~"; $singlefile= single.php preg_match_all($regex, $singlefile, $heading_results);
Can anyone tell me proper way to do this?