انجمن

  • mywordpress

    آفلاین
    عضو
    تعداد نوشته‌ها: ۶
    # نوشته شده: ۱۰ سال پیش
    ۲۵ آذر ۱۳۹۲ - ۱۳:۵۳

    نام پوسته فارس نیوز هست.این کدها مربوط به indexهست.
    من میخام که فقط مطالب یک دست خاص مثلا دسته 4 در سایت نمایش داده بشه.
    از افزونه هم استفاده کردم اما چون از اسلایدر هم استاده می کنم بهم میریزه.مثلا از افزونه front استفاده کردم اما وقتی دسته 4 رو فقط نشون میده اسلایدر من خالی میشه چون اسلایدر برای نمایش چندین دسته هست.
    کدهای وب رو هم چندتایی رو امتحان کردم ولی نشد.از اساتید میخام کمکم کنن.
    در ضمن این پوسته فقط شامل index-فانکشن-کامنت و استایل هست.

    کدهای موجود در ایندکس:

    <html>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » اخبار <?php } ?> <?php wp_title(); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php wp_head(); ?>
    </head>
    <body>
    <center>
    <div class="header">
    <div class="logo">
    "><img src="<?php bloginfo('template_url'); ?>/images/logo.gif" />
    <div class="logoinfobar">
    <div class="lngsitelinks">
    </div>
    <div class="dates">
    <script language="javascript" link="www.khatrokhat.ir">
    function showdate() {
    week= new Array("يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنج شنبه","جمعه","شنبه")
    months = new Array("فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دی","بهمن","اسفند");
    a = new Date();
    d= a.getDay();
    day= a.getDate();
    month = a.getMonth()+1;
    year= a.getYear();

    year = (year== 0)?2000:year;
    (year<1000)? (year += 1900):true;

    year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;

    switch (month) {
    case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;
    case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;
    case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;
    case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;
    case 5:
    case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;
    case 7:
    case 8:
    case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;
    case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;
    case 11:
    case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;
    default: break;
    }
    document.write(week[d]+" "+day+" "+months[month-1]+" "+ year);
    }
    </script>
    <script>showdate()</script>
    </div>
    <div class="gmttime"></div>
    </div>
    </div>
    </div>
    <div class="mainframe">
    <div class="rightcolumn">
    <div class="sdmenu" id="left-navbar-menu">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("right") ) ?>
    </div>
    </div>
    <div class="centercolumn">
    <?php if ( !is_single() and !is_page() ) : ?><div class="newsmainpane"><?php endif; ?>
    <?php if ( is_home() ) : ?>
    <?php
    global $post;
    $myposts = get_posts('numberposts=1');
    foreach($myposts as $post) :
    setup_postdata($post);
    ?>
    <?php $img = get_post_meta($post->ID, 'img', true); ?>
    <div class="impnews">
    <div class="impnewsinfo">
    " target="_blank"><div class="impnewsinfotitle"><?php the_title(); ?></div>
    <p class="newslead" style="line-height: 160%;"><?php the_excerpt_rss(); ?></p>
    </div>
    <div class="impnewspic">" target="_blank"><img src='<?php echo $img; ?>' /></div>
    </div><div class="impdownline"><div> </div></div>
    <?php endforeach; ?>
    <?php endif; ?>
    <?php if(have_posts()): ?><?php while(have_posts()):the_post(); ?>
    <?php $img = get_post_meta($post->ID, 'img', true); ?>
    <?php if ( is_single() or is_page() ) : ?>
    <div class="pagetitle">
    <div class="nwstxtctglink">
    <?php the_category(',') ?>
    </div>
    <div class="nwstxtdt" style="direction:rtl;"><?php the_date('d M Y'); ?></div>
    <div class="nwstxtnn">شماره:<?php the_ID(); ?></div>
    <div class="imgrepclear"></div>
    </div>
    <div class="nwstxtmainpane">
    <div class="nwstxtlinkicons">
    </div>
    <div class="nwstxttoppane">
    <div class="nwstxtnewsinfo">
    <div class="nwstxtrotitr"></div>
    <div class="nwstxtinfotitle"><?php the_title(); ?></div>
    </div>
    <div class="nwstxtpic">
    <img class="nwstxttoppic" src="<?php echo $img; ?>" />
    </div>
    </div>
    <p class="nwstxttext" style="line-height: 180%;"><?php the_content(''); ?></p>
    <div class="nwstxttablepane"></div>
    <?php comments_template(); ?>
    </div>
    <?php else : ?>
    <div class="topnews"><div class="topnewspic">" target="_blank"><img src='<?php echo $img; ?>' /></div><div class="topnewsinfo">" target="_blank"><div class="topnewsinfotitle"><?php the_title(); ?></div><p class="newslead" style="line-height: 160%;"><?php the_excerpt_rss(); ?></p></div></div><div class="topdownline"> </div>
    <?php endif; ?>
    <?php endwhile; ?><?php endif; ?>
    </div>
    <?php if ( !is_single() and !is_page() ) : ?></div><?php endif; ?>
    <div class="leftcolumn">
    <div class="leftmainnewspane">
    <div class="advertisement">
    <?php if ( !is_single() and !is_page() ) : ?>
    <center>
    <?php $options = get_option('mc_options'); ?>
    <?php if ($options['show_ads']) : ?><?php if($options['ads_contents']) { echo ($options['ads_contents']); } else { _e('شما باید از بخش "پوسته ها » ویرایش تبلیغات" تبلیغات خود را بصورت اچ تی ام ال قرار دهید و یا آن را غیر فعال کنید.','kubric'); } ?><?php endif; ?>
    </center>
    <?php endif; ?>
    </div>
    <?php if ( !is_single() and !is_page() ) : ?>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("left") ) ?>
    <?php endif; ?>
    </div>
    </div>
    </div>
    <center>
    <div style="direction:ltr; width:450px; text-align:left; clear:both;"><?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?></div>

    </center>
    <div class="footerpane">
    <div class="copyright">
    تمامی حقوق مادی و معنوی برای این سایت محفوظ می باشد

    </div>
    </div>
    </center>
    </body>
    </html>
    `

  • MD:::... Hosseini

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۶۰
    تشکر شده: ۴۸ بار
    # نوشته شده: ۱۰ سال پیش
    ۱۵ دی ۱۳۹۲ - ۰۲:۱۹

    سلام
    شما لینک سایتتون رو لطف کنید بزارید بهتر میشه کمک کرد

درباره‌ی این موضوع



برچسب‌ها

هیچ برچسبی نیست.