F
frankox3
Alfa
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Buenas comunidad, primera vez que hago un website, pero tengo por entendido (leyendo) que mientras menos plugins tienes instalados es mejor para tu site, hasta ahi todo bien y es por eso que decidi colocar mediante codiigo los comentarios de face en los post, pero tengo algunos problemillas, espero que me puedan guiar 😛8:
El codigo en color rojo es el codigo que agregue yo :s en child theme tengo lo siguiente:
Comments.php
Functions.php ->este codigo solo lo puse tratando de arreglar el problema (el problema ocurre con o sin este codigo)
Header.php
ERRORES:
- al comentar con una cuenta "x" aparece el siguiente error, pero queda el comentario publicado y no aparece el comentario para moderarlo desde url=https://developers.facebook.com/tools/comments

- Solo en algunos post la caja de comentarios de facebook me muestra el boton para poder moderar (tengo incluidos los moderadores desde Log into Facebook | Facebook)
El codigo en color rojo es el codigo que agregue yo :s en child theme tengo lo siguiente:
Comments.php
Insertar CODE, HTML o PHP:
[COLOR="#FF0000"]<div class="fb-comments" data-href="" data-width="100%" data-numposts="5"></div>[/COLOR]
<?php
/* If a post password is required or no comments are given and comments/pings are closed, return. */
if ( post_password_required() || ( !have_comments() && !comments_open() && !pings_open() ) )
return;
?>
<?php
if ( current_theme_supports( 'woocommerce' ) ) {
if ( is_cart() || is_checkout() )
return;
}
?>
<section id="comments-template">
<?php if ( have_comments() ) : // Check if there are any comments. ?>
<div id="comments">
<h3 id="comments-number"><?php comments_number(); ?></h3>
<ol class="comment-list">
<?php wp_list_comments(
array(
'style' => 'ol',
'callback' => 'hybrid_comments_callback',
'end-callback' => 'hybrid_comments_end_callback'
)
); ?>
</ol><!-- .comment-list -->
<?php get_template_part( 'template-parts/comments-nav' ); // Loads the template-parts/comments-nav.php template. ?>
</div><!-- #comments-->
<?php endif; // End check for comments. ?>
<?php get_template_part( 'template-parts/comments-error' ); // Loads the template-parts/comments-error.php template. ?>
<?php comment_form(); // Loads the comment form. ?>
</section><!-- #comments-template -->
Functions.php ->este codigo solo lo puse tratando de arreglar el problema (el problema ocurre con o sin este codigo)
Insertar CODE, HTML o PHP:
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
// END ENQUEUE PARENT ACTION
[COLOR="#FF0000"]function og_metatags() {
global $post;
if(! is_single() ) return;
/** Make necessary edits here **/
$og_type_homepage = "website"; //Content type of the homepage.
$og_type = "article"; //You can change this to use a different a content type if needed. Eg: profile.
$fb_admin = "10001010010101"; //Add your facebook ID between quotes.
$app_id = "385631648601088"; //Enter your App ID here.
?>
<meta property="og:url" content="<?php the_permalink(); ?>"/>
<meta property="og:title" content="<?php single_post_title(''); ?>" />
<meta property="og:type" content="<?php echo $og_type; ?>" />
<meta property="og:site_name" content="<?php bloginfo(); ?>" />
<meta property="fb:admin" content="<?php echo trim($fb_admin); ?>" />
<meta property="fb:app_id" content="<?php echo trim($app_id); ?>" />
<?php
}
add_action('wp_head', 'og_metatags', 4);[/COLOR]
Header.php
Insertar CODE, HTML o PHP:
<!DOCTYPE html>
<html <?php language_attributes( 'html' ); ?> class="no-js">
<head>
<?php
// Fire the wp_head action required for hooking in scripts, styles, and other <head> tags.
wp_head();
?>
[COLOR="#FF0000"]<meta property="fb:app_id" content="385631648601088" />[/COLOR]
</head>
<body <?php hybridextend_attr( 'body' ); ?>>
[COLOR="#FF0000"]<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v3.0&appId=385631648601088&autoLogAppEvents=1';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>[/COLOR]
<?php
// Displays a friendly note to visitors using outdated browser (Internet Explorer 8 or less)
maghoot_update_browser();
ERRORES:
- al comentar con una cuenta "x" aparece el siguiente error, pero queda el comentario publicado y no aparece el comentario para moderarlo desde url=https://developers.facebook.com/tools/comments

- Solo en algunos post la caja de comentarios de facebook me muestra el boton para poder moderar (tengo incluidos los moderadores desde Log into Facebook | Facebook)
Última edición: