Forums

"If Trackback enabled" function? (4 posts)

  1. gadlen
    Member
    Posted 6 years ago #

    I currently use the following at the bottom of my posts to tell users I support Trackbacks:

    <a href="<?php trackback_url(); ?>" title="Trackback URI. Copy and paste this into your own post to create a trackback."> <?php trackback_url(); ?></a><br>

    My older posts do not allow trackbacks to protect against spam and... well, just because. Is there a function I can wrap my code in such that [pseudo-code]

    If this post has trackbacks enabled then ...

    Thanks
    http://lee.org/blog

  2. gadlen
    Member
    Posted 6 years ago #

    That's not really pseudocode... more like logic...

    I'm looking for "If the current post has trackbacks enabled, then display the trackback URL."

    Is there any such WP function?

  3. gadlen
    Member
    Posted 6 years ago #

    I figured it out. The code was in WordPress Default Template.

    <?php if ('open' == $post->ping_status) { ?>
    <a>" title="Trackback URI. Copy and paste this into your own post to create a trackback."> <?php trackback_url(); ?></a>
    <?php } ?>

  4. gadlen
    Member
    Posted 6 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic