WordPress.org

Ready to get started?Download WordPress

Forums

Loop show posts till 11 november (1 post)

  1. babovnikova
    Member
    Posted 1 year ago #

    There is page with graph with posts from category.

    Now it's broken! Help me, please.

    It stops on 11 november and show only 8 posts. I don't edit code, but some time ago delete some other categories.

    <?php
    	query_posts('page_id=149'); ?>
    	<h1><? the_title(); ?></h1>
    	<? if (have_posts()) {
    		the_post();
    ?>
    		<?php the_content(); ?>
    <?php
    	}
    ?>
    
    <?php 
    
    query_posts('cat=16&order=ASC'); ?>
    
    <table>
    <tr>
    	<th>Дата</th>
    	<th>Тема</th>
    	<th>Авторы и ведущие</th>
    	<th>Цена</th>
    </tr>
    <?php
    	// Here we obtaining posts from the certain categoty for the certain page
    
    	if (have_posts()) : // loop through posts
    		while (have_posts()) : the_post();
    
     if (date('Y') <= mysql2date('Y', $post->post_date))
     {
      if ((date('m') <= mysql2date('m', $post->post_date)) or (date('Y') < mysql2date('Y', $post->post_date)))
      {
       if ((date('d') <= mysql2date('d', $post->post_date)) or (date('m') < mysql2date('m', $post->post_date)) or (date('Y') < mysql2date('Y', $post->post_date)))
       {
    ?>
    
    		<div class="post">
    <tr>
    	<td class="noborder"><a>" name="<?php the_time('d.m.Y-G:i') ?>"></a><strong><?php the_time('d.m.Y') ?></strong>  <?php the_time('G:i') ?></td>
    	<td class="noborder"><p><strong><?php the_title(); ?></strong></p><p><?php echo get_post_meta($post->ID, 'city', true);?></p></td>
        <td class="noborder"><?php the_content(); ?></td>
    	<td class="noborder"><?php the_excerpt(); ?>
    </td>
    </tr>
    <tr><td colspan="4">
    
    <?
    
    if (in_category('43'))
    {?>
    <div class="semceps">Региональный центр экономико-правовых семинаров<span class="semtel">Справки по телефонам: (863) 300-12-01, 300-12-05</span></div>
    <?php }
    else
    {?>
    <div class="semumc">Учебно-методический центр<span class="semtel">Справки по телефонам: (863) 300-12-01, доб. 1077, 1103</span></div>
    <?php }
    
       if ((date('d') < mysql2date('d', $post->post_date)) or (date('m') < mysql2date('m', $post->post_date)) or (date('Y') < mysql2date('Y', $post->post_date)))
       {
    
    if (in_category('43'))
    {?>
    <div class="butsemceps"><a>" onclick="preWin=window.open('<?php the_permalink(); ?>', 'previewwindow', 'width=650, height=700, top=' + (screen.width/2-10)+', left=' + (screen.width/2-300)+', location=no, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0, directories=0, hotkeys=0'); preWin.focus(); return false;">Отправить заявку на участие</a></div>
    <?php }
    
    if (in_category('44'))
    {?>
    <div class="butsemumc"><a>" onclick="preWin=window.open('<?php the_permalink(); ?>', 'previewwindow', 'width=650, height=700, top=' + (screen.width/2-10)+', left=' + (screen.width/2-300)+', location=no, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0, directories=0, hotkeys=0'); preWin.focus(); return false;">Отправить заявку на участие</a></div>
    <?php }
    
    }
    ?>
    
    </td></tr>
    <?php
    
    }}}
    		endwhile;
    
    	endif;
    ?>
    </table>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags