URL file-access is disabled in the server – is the error I’m getting with Short URLs. I’m no PHP coder, so if you could post the code I should be using I would appreciate it! How do I rewrite the path?
In functions:
//////////////////////////////////////// Custom templates: page templates
add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' ));
The call:
<?php $turl = getTinyUrl(get_permalink($post->ID));
echo 'Short URL <a href="'.$turl.'">'.$turl.'</a>' ?>
If PHP has cURL enabled you can add this function:
and then change your code to use the new function:
Hope that helps