Not working at all
-
Basically I’m using a variation of the wp_list_comments function
Which means this plugin isn’t working for me. I LOVE the idea of it and would really like to get it to work.
http://wordpress.org/extend/plugins/custom-comment-form-title/
-
It doesn’t look like anything in the wp_list_comments function should be affecting the title_reply parameter in the comment_form_defaults function, so I wonder if there might be something else going on.
Couple of questions that might help me figure out what is going on:
- Can you provide a link to your site?
- What theme are you using? Is it one you downloaded or a one-off that was custom-built?
- Did you add the code for the wp_list_comments function into your functions.php file? If so, could you paste that bit here so I can see it?
We’ll start there and see if it yields any answers.
It’s custom… by me lol.
The comment form itself is manually coded into the theme itself, not a function (only the comments themselves are a function) so that’s probably where the issue stands as I’m not using
<?php comment_form(); ?>
Is there a way to pull it manually? Like
<?php echo custom_comment_form_title(); ?>
Or even (didn’t get a chance to look over your code) pulling the meta?
<?php echo get_post_meta($post->ID, 'Custom Comment Form Title', true); ?>
The fact that you aren’t using
<?php comment_form(); ?>
is definitely where the issue is occurring, so kudos to figuring that out on your own.If the settings page for the plugin allows you to enter and save a text string, and meta boxes appear on individual posts that also allow you to input text (and it is saving), then that information should be saving to the database. Whether or not that data can be extracted and output outside of the
comment_form()
function is another question.Is it safe to assume you are using a comments.php file in your theme? Would it make any sense to replace that with the newer
comment_form()
function? http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/The parameter the plugin is updating is
title_reply
in the<?php comment_form(); ?>
function: http://codex.wordpress.org/Function_Reference/comment_formI’m gonna have to do some fiddling to see if I can figure out exactly what code would need to be added to a comments.php file with the older code. It’s something that may not be very hard to do, but having never done it before, I’ve gotta do some research!
I never liked doing comment_form in general, however now that I know what you’re updating, it helps me try and figure out how to pull the information!
I’m working on it too. I’ve downloaded the old-school “Default” theme that used to come with WordPress back in the day. I think the plugin doesn’t work with the old “Default” theme for the same reason it doesn’t work with yours. Now I’m kind of curious as to just what the solution will be!
LOL or I could just suck it up and change.
I’m just going to copy the code from wp-includes and turn it into a custom function in my functions.php
This goes to show how much I want to use your plugin LOL!
I might have something for you here.
Somewhere in the code for your comments form you probably have something like this:
<?php comment_form_title( __('Leave a Reply', 'kubrick'), __('Leave a Reply for %s' , 'kubrick') ); ?>
You can replace that line with this:
<?php $post_id = get_the_ID(); if ( !empty( $post_id ) ) { $arg = get_post_meta( $post_id, 'ccft_post_comment_title', true ); } if ( empty( $arg ) ) { $ccft_admin_options = get_option( 'custom_comment_form_title' ); $arg = esc_attr( $ccft_admin_options['default_title'] ); } echo '<h3>' . $arg . '</h3>'; ?>
My small amount of testing over here has this working (although I haven’t tested it in a variety of situations).
Works perfectly! Switched from
<?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?>
to that snippet.I also had already created a custom comment form function which ALSO solved the issue.
Yay for learning today!
i included the whole plugin in my theme functions.php and implemented the custom code in comments.php. It is working beautifully and perfect. Thanks author for this beautiful plugin 🙂
- The topic ‘Not working at all’ is closed to new replies.