• Hello WP people,

    I am in the process of building a website for a client and will need to display on the frontpage the comments left in a subpage (not part of the blog). I chose to go with the “Recent Comments” plugin because it allows me to display only the comments from a page and not the blog. And here’s my problem. I will try to make it as easy as possible:

    I add to create an additional field to the comments area to display a title. To do so, I used another plugin called “Extra Comment Field” and created a new variable for the field I needed. I called it “recipe_name”. I also included in the comments.php file the following lines:

    <p><?php print $comment->extra_recipe_name; ?></p> just above <?php if ($comment->comment_approved == '0') : ?>

    and:
    <input type="text" name="recipe_name" id="recipe_name" tabindex="4" size="22" /> in the form.

    The new variable was created in my database and works as expected returning a value.

    Now, in order to have the “Recent Comments” plugin recognize this new field, I read on the plugin website that I need to add a new function to the “output_tags.php” file following this template:

    function otf_postid ($option_key, $result, $ext) {
    	return $result->ID;
    }

    So here it is. I spend 3 days trying to find an answer to this question. I even emailed the creator of the plugin but never got an answer. I’m no PHP coder and even though it might be a simple thing to do to get it to work, I just can’t seem to figure it out.

    Please help 🙂

  • The topic ‘PHP help needed for “Recent Comments” plugin’ is closed to new replies.