← WordPress

Activar Comentários no Wordpress

Lida 2232 vezes

Offline

HilarYo 
Membro
Mensagens 188 Gostos 2
Troféus totais: 20
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Bons dias,
Alguém sabe como posso activar os comentários no wordpress, no template DanceFloor? Exemplo do evento na minha página: http://www.portugalflash.com/event/concerto-dos-dealema-nerga-guarda/

Código events.php
Código: (php) [Seleccione]
<?php
/*
Template Name: Events
*/
?>

<?php get_header(); ?>
<?php $options get_option('dancefloor_theme_options_layout'); $theme_layout $options['design']; if (!$theme_layout$theme_layout "left";?>
<div class="container">   
<div class="contents-<?php echo $theme_layout ?>"  style="padding-top:16px;">
               <?php $query = new WP_Query(array(  'paged' => $paged,'post_status' => array(  'publish''future' ),'post_type' => array( 'events' ) )); if ( $query->have_posts() ): while ( $query->have_posts() ) : $query->the_post(); ?>
    <div class="post-wrapper">
      <h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title();?></a></h2>
      <div class="post-container">
<h4 class="post-date"><?php the_time('M'); ?><span><?php the_time('j'); ?></span></h4>           
            <div class="post-thumb-container">
       <a href="<?php the_permalink(); ?>">
<?php gorilla_img('home_thumb');?>
</a>   
</div>
            <div class="post-data">
                  <?php the_excerpt(); ?>
<div class="btn-wrapper">
<a class="read-more-btn" href="<?php the_permalink() ?>"><?php _e('Ler Mais','language');?></a>
                <p><?php the_tags('Posted in: '', '' '); ?></p>
            </div>
            </div>           
      </div>
</div><!-- post wrapper closed -->
<?php endwhile; endif; ?>
<?php theme_pagination$query->max_num_pages); ?>
            </div><!-- content closed -->
            <?php get_sidebar(); ?>
</div><!-- container closed -->
<?php get_footer(); ?>

Obrigado, Cumprimentos
Offline

AnaMartelo 
Administrador
Mensagens 2071 Gostos 25
Feedback +28

Troféus totais: 29
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Não tens os comentários fechados automaticamente no WP ?
Offline

kurtmix 
Membro
Mensagens 1895 Gostos 605
Feedback +4

Troféus totais: 28
Trófeus: (Ver todos)
Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Seventh year Anniversary Search Level 5 Windows User Super Combination Combination Topic Starter

Não tens os comentários fechados automaticamente no WP ?

Está-me a parecer que tem...
Offline

HilarYo 
Membro
Mensagens 188 Gostos 2
Troféus totais: 20
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Como assim?
Offline

tartofs 
Membro
Mensagens 205 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Tenth year Anniversary Nineth year Anniversary Windows User Linux User Mobile User Level 5 Super Combination Combination Topic Starter Level 4

Testa lá, acrescentando isto a esse events.php:

Código: [Seleccione]
<?php comments_template(); ?>
Tens a certeza que essa é a página que controla os eventos?

É que aparece informação dos comentários mas não o formulário. Se estão fechados vai a Opções -> Discussão -> Permitir comentários em novos artigos

Ou então vê se não estão fechados na página do evento.
Offline

HilarYo 
Membro
Mensagens 188 Gostos 2
Troféus totais: 20
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter Level 4 Level 3 Level 2 Level 1 100 Posts 50 Posts

Na página dos eventos, nem aparece a opção  de permitir comentários, e está tudo Ok em, no entanto, o  events.php corresponde a pagina onde são apresentados os eventos...



Aqui está o código responsável: single-events.php
Código: (php) [Seleccione]
<?php get_header(); ?>
<?php $options get_option('dancefloor_theme_options_layout'); $theme_layout $options['design']; if (!$theme_layout$theme_layout "left";?>
<div class="container">
<div class="contents-<?php echo $theme_layout ?>" style="padding-top:16px;">
<div class="post-wrapper">
<?php if (have_posts()) : ?>
            <?php while (have_posts()) : the_post(); ?>   
            <h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title();?></a></h2>
            <div class="post-container">
<h4 class="post-date"><?php the_time('M'); ?><span><?php the_time('j'); ?></span></h4>
<div class="post-data">
<?php
if(has_post_thumbnail()) {
$image_id get_post_thumbnail_id();
$image_url wp_get_attachment_url($image_id);
?>

<div class="featured-pic-wrapper">
<?php the_post_thumbnail('single');?>
  </div>
<?php
}
?>

<?php the_content();?>
<div class="post-tags"><p><?php the_tags('Posted in: '', '' '); ?></p></div>
<?php endwhile;endif; ?>
<div class="comments-wrapper">
<div class="comments-head">
<h4><?php comments_number('No Comments''One Comment''% Comments' );?>:</h4>
<p><a href="#comment"><?php _e('Add a Comment','language');?></a></p>
</div>
<?php comments_template(); ?>
                        </div><!--comments-wrapper closed -->
                  </div>
</div>
</div><!-- post wrapper closed -->
</div><!-- content closed -->
<?php get_sidebar(); ?> 
</div><!-- container closed -->
<?php get_footer(); ?>