Support » Plugin: Post Snippets » [Plugin: Post Snippets] PHP Include in snippet

Viewing 1 replies (of 1 total)
  • Plugin Author Johan Steen

    (@artstorm)

    Yes, you can use the include command in a snippet and combine it with variables.

    the php tags shouldn’t be used though, and php’s include function can’t include over the http:// protocol so you need to use the file system path to the file you want to include.

    So something like this should do it (shortcode snippet with the php flag set):

    include("/file/system/{directory-name}/to/file.php");

    Cheers,
    Johan

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Post Snippets] PHP Include in snippet’ is closed to new replies.