I need to correct this code, I don't know why my PHP is commented out every time:
$output = '<ul class="custom_code">
<li class="custom_code">
<?php echo wpfp_link(); ?>
</li></ul>';
return $output;
echo runs immediately. It doesn't return anything. So your code is effectively running as if it was written like this:
echo wpfp_link();
$output = '<ul blah blah blah</ul>';
return $output;
Given you're dealing with wordpukepress, you probably want something more like
$output = '<ul blah blah ' . get_wpfp_link() . '...</ul>';
return $output;
As well, PHP is not resursively embeddable, as you have. This code will not work as you think it would:
<?php
echo '<?php echo 'foo' ?>';
?>
This will output <?php echo 'foo' ?>, not just 'foo'.
$output = '<ul class="custom_code"><li class="custom_code">'.wpfp_link().'</li></ul>';
return $output;
definitely will works. BUT we sure that you don't use short php tags /or they turned on in php.ini
so all this should looks like:
function print_li(){
$output = '<ul class="custom_code"><li class="custom_code">'.wpfp_link().'</li></ul>';
return $output;
}
where wpfp_link returns a list with <li> tags.
<?php echo wpfp_link(); ?>so get rid of the PHP tags.