I have tested the PHP widget - and it works with the usual "Hello World" - however, I can never seem to get a simple include code to execute.
\<?php include 'pagetitles.php'; ?>\
thoughts?
I have tested the PHP widget - and it works with the usual "Hello World" - however, I can never seem to get a simple include code to execute.
\<?php include 'pagetitles.php'; ?>\
thoughts?
That include isn't specific as to the location of 'pagetitles.php'. When you're running in the widget context, you don't know the relative location of where the executing file is. So use the ABSPATH constant to specify the location of your file relative to the WP Root directory.
You must log in to post.