Wordpress themes compatibility with php
As preparing blog for one of clients I have found problems with get it running, after some web research I have found that Hemingway theme uses old syntax … instead of downgrading my server or allowing old syntax I have wrote script that converts old syntax to current working one.
This is the script:
grep -rl "<?" . | grep "\.php$" | xargs sed -i "s/<?\([^=^p]\)/<?php\1/g;s/<?\($\)/<?php\1/g;s/<?=/<?php echo /g"
Navigate to Your theme dir and call it there, it will repair all php files:
- replace <? markers to <?php
- replace <= markers to <?php echo
For me this solved problems with Hemingway theme.





