file_get_contents() in wp template
-
Dear all, I have added to my child-theme some lines in archive.php template, which point to some category IDs, all works fine.
But among this html there is also some h1 text which should be updated frequently, and I want to manage it from external path.
To do this, may I use the php function “
file_get_contents()
” (+ url) pointing to an external .txt file?Or as alternative something like “
$xxx_string = include('text.txt')
;” (+ url), pointing to an external .txt (which in this case should start with “<?php return
“)?Or which is the official wp method to achieve this?
Thank you in advance.
- The topic ‘file_get_contents() in wp template’ is closed to new replies.