ThemeShaper Forums » Thematic

Custom hooks/filters: childtheme_postfooter help

(1 post)
  • Started 10 years ago by JacquesR
  • This topic is not resolved

Tags:

  1. Could anyone who is using the post footer code at http://themeshaper.com/custom-wordpress-hooks-filters-thematic-06/ perhaps assist a php novice?

    I've closed comments and trackbacks on my blog, but am using the post_to_smf plugin, which adds a link to a SMF forum topic based on the post in question. So, while it works fine to replace the last line of this code

    <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?>
    <?php _e('Both comments and trackbacks are currently closed.') ?>

    with this:

    <?php if(function_exists('post_to_smf_link')) {post_to_smf_link('Comments: read and post comments in the discussion forum'); } ?>

    I'd really like to combine both of these with code like:
    <?php if(function_exists('post_to_smf_link')) {post_to_smf_link('Comments: read and post comments in the discussion forum'); } ?> ELSE
    <?php _e('To leave a comment, please go to the discussion forum.') ?>

    In other words, for new posts where the forum link already exists, a link appears to the specific forum thread, but if that thread doesn't exist yet, a link appears to the homepage of the forum. I've tried as many different permutations as my very vague php knowledge allows, but they all cause errors.

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.