[Plugin: Facebook AWD All in one] How to get work the comments plugin with the wp coments deactivate
-
read this post, http://wordpress.org/support/topic/plugin-facebook-awd-all-in-one-use-facebook-comments-instead-of-default-comments?replies=6#post-3026294
You must add the comment box in your template using php shortcode function and deactivate the default comments system
when i add the line
<?php echo do_shrotcode('[AWD_comments option="value"]'); ?>
to the comments.php my site stops loading from the comment, should add it somewhere else?There is a typo in the function name
Try do_shortcode();
instead of do_shrotcode()This line is an exemple line.
Go on the plugins in the admin of Facebook AWD,
Look at the bottom of the form there is a list of available options.the part option=”value” is an exemple to help you understanding how to use it.
It should work like that:
<?php echo do_shortcode('[AWD_comments url="'.get_permalink().'"]'); ?>
Note that at the end of the month the new release of Facebook AWD will change a lot… so if you add some code in your template, You should tkae care when you will update it.
I use this theme http://www.yootheme.com/themes/downloads/load?id=393&token=0e8856a7&format=raw and find the comments.php in wp-content/themes/yoo_master/warp/systems/wordpress/layouts/comments.php
change this:<?php else : ?> <form class="short" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> <?php if (is_user_logged_in()) : ?> <?php global $user_identity; ?> <p class="user"><?php printf(__('Logged in as <a href="%s">%s</a>.', 'warp'), get_option('siteurl').'/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'warp'); ?>"><?php _e('Log out »', 'warp'); ?></a></p> <?php else : ?> <?php $req = get_option('require_name_email');?> <div class="author <?php if ($req) echo "required"; ?>"> <input type="text" name="author" placeholder="<?php _e('Name', 'warp'); ?> <?php if ($req) echo "*"; ?>" value="<?php echo esc_attr($comment_author); ?>" size="22" <?php if ($req) echo "aria-required='true'"; ?> /> </div> <div class="email <?php if ($req) echo "required"; ?>"> <input type="text" name="email" placeholder="<?php _e('E-mail', 'warp'); ?> <?php if ($req) echo "*"; ?>" value="<?php echo esc_attr($comment_author_email); ?>" size="22" <?php if ($req) echo "aria-required='true'"; ?> /> </div> <div class="url"> <input type="text" name="url" placeholder="<?php _e('Website', 'warp'); ?>" value="<?php echo esc_attr($comment_author_url); ?>" size="22" /> </div> <?php endif; ?> <div class="content"> <textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea> </div> <div class="actions"> <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'warp'); ?>" /> <?php comment_id_fields(); ?> </div> <?php do_action('comment_form', $post->ID); ?> </form> <?php endif; ?>
Then i add the hooks in like so:
<?php else : do_action('comment_form_before'); ?> <form class="short" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> <?php if (is_user_logged_in()) : ?> <?php global $user_identity; ?> <p class="user"><?php printf(__('Logged in as <a href="%s">%s</a>.', 'warp'), get_option('siteurl').'/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'warp'); ?>"><?php _e('Log out »', 'warp'); ?></a></p> <?php else : ?> <?php $req = get_option('require_name_email');?> <div class="author <?php if ($req) echo "required"; ?>"> <input type="text" name="author" placeholder="<?php _e('Name', 'warp'); ?> <?php if ($req) echo "*"; ?>" value="<?php echo esc_attr($comment_author); ?>" size="22" <?php if ($req) echo "aria-required='true'"; ?> /> </div> <div class="email <?php if ($req) echo "required"; ?>"> <input type="text" name="email" placeholder="<?php _e('E-mail', 'warp'); ?> <?php if ($req) echo "*"; ?>" value="<?php echo esc_attr($comment_author_email); ?>" size="22" <?php if ($req) echo "aria-required='true'"; ?> /> </div> <div class="url"> <input type="text" name="url" placeholder="<?php _e('Website', 'warp'); ?>" value="<?php echo esc_attr($comment_author_url); ?>" size="22" /> </div> <?php endif; ?> <div class="content"> <textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea> </div> <div class="actions"> <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'warp'); ?>" /> <?php comment_id_fields(); ?> </div> <?php do_action('comment_form', $post->ID); ?> </form> <?php do_action('comment_form_after'); endif; ?>
everything works fine, but when i disable the WP comments, facebook comments also disappear.
You must replace the end of the file and add the shortcode after the
endif; ?>
like that
[...] endif; echo do_shortcode('[AWD_comments url="'.get_permalink().'"]'); ?>
And you must disbale the auto add of the comment box in the settings of the plugin.
- The topic ‘[Plugin: Facebook AWD All in one] How to get work the comments plugin with the wp coments deactivate’ is closed to new replies.
(@trrance)
11 years, 9 months ago
I need to deactivated the wordpress comments and only left the AWD comment plugin in post, but i dont have the do_action(“comment_form_after”) in my theme or comments.php
Please helpme to configure this plugin
http://wordpress.org/extend/plugins/facebook-awd/