• Hello

    I am using “Advanced category excluder” to exclude some categories from appearing on the home page, and while the plugin is working great i still need to do some manipulations to the home page that i would like to get some help from you guys to achieve, so here it is:

    1-I’ve use the marquee code to show the latest posts using this:
    [code]
    <marquee dir="rtl" id="title1" direction="right" scrollamount="3" onmouseover="this.stop()" onmouseout="this.start();">
    | <?php
    if (have_posts()) :
    while (have_posts()) : the_post();
    $arc_year = get_the_time('Y');
    $arc_month = get_the_time('m');
    $arc_day = get_the_time('d');
    ?>
    "><?php the_title(); ?> |
    <?php endwhile; endif; ?></marquee> [/c/de]

    %pAand it worked but the problem is that now after the marquee part is done and we come to the normal article posting, the latest post is shown twice, anyideas why? and how can i fix it?

    2-What is the code i should use to have the home page show only the latest article(one item) from a certain category as long as it not older then 24 hours, kind of like a "breaking news" category, so if say i post something into the category "breaking news" for example, it will show up on the front page at the top in special formatting. i'm looking for the function that i can put in the index.php template file that will do that

    that's it for now, and i would really appreciate some help

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter darkoysm

    (@darkoysm)

    here’s the index.php template file if that might help
    <?php get_header(); ?>
    <!– BEGIN content –>
    <div id=”content”>
    <?php
    if (have_posts()) : the_post();
    $arc_year = get_the_time(‘Y’);
    $arc_month = get_the_time(‘m’);
    $arc_day = get_the_time(‘d’);
    ?>
    <!– begin recent post –>
    <div class=”recent post”>
    <h2 class=”title”>??? ???????</h2>
    <h2>“><?php the_title(); ?></h2>
    <?php the_excerpt(); ?>
    “>???? ??????
    </div>
    <!– end recent post –>
    <?php else : ?>
    <div class=”notfound”>
    <h2>?? ????</h2>
    <p>?????, ????? ???? ?? ??? ??? ?????</p>
    </div>
    <?php endif; ?>
    <div class=”posts”>
    <?php
    if (have_posts()) :
    while (have_posts()) : the_post();
    $arc_year = get_the_time(‘Y’);
    $arc_month = get_the_time(‘m’);
    $arc_day = get_the_time(‘d’);
    ?>
    <!– begin post –>
    <div class=”post”>
    <h2>“><?php the_title(); ?></h2>
    <?php dp_attachment_image($post->ID, ‘thumbnail’, ‘alt=”‘ . $post->post_title . ‘” class=”thumbnail”‘); ?>
    <?php the_excerpt(); ?>
    <div class=”details”>
    “>???? ??????
    <?php comments_popup_link(‘?? ???????’, ‘????? ????’, ‘% ???????’); ?>
    </div>
    </div>
    <!– end post –>
    <?php endwhile; endif; ?>
    <div class=”break”></div>
    </div>
    </div>
    <!– END content –>
    <?php get_sidebar(); get_footer(); ?>

    Thread Starter darkoysm

    (@darkoysm)

    here’s the index.php template file if that might help

    <?php get_header(); ?>
    <!-- BEGIN content -->
    <div id="content">
    <?php
    if (have_posts()) : the_post();
    $arc_year = get_the_time('Y');
    $arc_month = get_the_time('m');
    $arc_day = get_the_time('d');
    ?>
    <!-- begin recent post -->
    <div class="recent post">
    	<h2 class="title">??? ???????</h2>
    	<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    	 <?php the_excerpt(); ?>
    	 <a href="<?php the_permalink(); ?>">???? ??????</a>
    </div>
    <!-- end recent post -->
    <?php else : ?>
    <div class="notfound">
    	<h2>?? ????</h2>
    	<p>?????, ????? ???? ?? ??? ??? ?????</p>
    </div>
    <?php endif; ?>
    <div class="posts">
    <?php
    if (have_posts()) :
    while (have_posts()) : the_post();
    $arc_year = 'et_the_timee28'Y');
    $arc_month = get_the_time('m');
    $arc_day = get_the_time('d');
    ?>
    <!-- begin post -->
    <div class="post">
    	<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    	<a href="#"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '" class="thumbnail"'); ?></a>
    	<?php the_excerpt(); ?>
    	<div class="details">
    	<a href="<?php the_permalink(); ?>">???? ??????</a>
    	<?php comments_popup_link('?? ???????', '????? ????', '% ???????'); ?>
    	</div>
    </div>
    <!-- end post -->
    <?php endwhile; endif; ?>
    <div class="break"></div>
    </div>
    </div>
    <!-- END content -->
    <?php get_sidebar(); get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘home page articles manipulations’ is closed to new replies.