• Здравствуйте подскажите пожалуйста как мне сделать , чтобы на главной странице выводились новости только той рубрики которой я хочу ?

    Код главной страницы :

    <?php get_header(); ?>

    <div class=»col1″>

    <?php include(TEMPLATEPATH . ‘/includes/featured.php’); ?>

    <?php
    if(get_option(‘woo_show_video’) == «true»){ include(TEMPLATEPATH . ‘/includes/video.php’); }
    ?>

    <?php
    $layout = get_option(‘woo_layout’);
    if ($layout == «false»)
    include(‘layouts/default.php’);
    else
    include(‘layouts/blog.php’);
    ?>

    </div><!—/col1—>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

Просмотр 1 ответа (всего 1)
  • <div class=»box»>

    <?php

    $the_query = new WP_Query(‘cat=-‘. $GLOBALS[ex_feat] . ‘,-‘ . $GLOBALS[ex_vid] . ‘&showposts=’ . get_option(‘woo_other_entries’) . ‘&orderby=post_date&order=desc’);

    $counter = 0;

    while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
    ?>

    <?php $counter++; ?>

    <div class=»post-alt blog» <?php if ( ($counter == 4) ) { echo ‘style=»background:none !important;margin-bottom:0 !important;»‘; ?><?php } ?>>

    <?php woo_image(‘height=57&width=100&class=th’); ?>

    <h2><?php the_category(‘, ‘) ?></h2>
    <h3> <?php the_title(); ?>» href=»<?php the_permalink() ?>» rel=»bookmark»><?php the_title(); ?></h3>
    <p class=»posted»><?php the_time(‘d F Y’); ?></p>

    <div class=»entry»>
    <?php the_content(‘<span class=»continue»>’.__(‘Читать полностью’).'</span>’); ?>
    </div>

    <p class=»comments»><?php comments_popup_link(__(‘Отзывов (0)’), __(‘Отзывов (1)’), __(‘Отзывов (%))); ?></p>

    </div><!—/post—>

    <?php endwhile; ?>

    <div class=»fix»></div>

    <?php $archives_page = get_option(‘woo_archives_page’) . ‘/’; ?>

    <p class=»ar hl3″>» class=»more»><?php _e(‘БОЛЬШЕ СТАТЕЙ В АРХИВЕ’); ?></p>

Просмотр 1 ответа (всего 1)

Тема «Показ новостей» закрыта для новых ответов.