رفتن به مطلب

حذف و تغییر چند کد در قالب ودرخواست چند کد


پست های پیشنهاد شده

سلام دوستان

من میخوام چند تا کد قالبم را تصحیش کنم اما هر کار میکنم به هم میخوره!

post-350-0-76699500-1348341851_thumb.jpg

این قسمت داغ میخوام پر بازدید ترین پستها بیاد ( االبته خودم گذاشتم ها ولی قالب بهم ریخت)الان فقط یه پست میاره اون هم پست بیشترین بازدید نیست و دومین تغییر میخوام تاریخ را فارسی کنم که اگر امکانش هست ممنون میشم

<?php get_header(); ?>

<body>

<div class="PageCotainer">

<div class="HeaderCotainer">

<p class="HeaderCotainerLogo"><a href="<?php bloginfo('url') ?>" target="_self" title="پارسی پالس"><em>

پارسی پالس</em></a></p>

</div>

<?php include (TEMPLATEPATH . '/topmenu.php'); ?>

<div class="TopNavCotainer">

<div class="TopNavCotainerRightCell"></div>

<div class="TopNavCotainerMiddleCell">

<div class="TopNavCotainerMiddleCellHot">

<div class="gk_news_highlighter" id="news-highlight-1">

<div class="gk_news_highlighter_interface">

<span class="text"> </span>

</div>

<div class="gk_news_highlighter_wrapper">

<marquee direction="right" scrollamount="5" scrolldelay="89" width="690" height=15 style="text-align:right;" onmouseover="this.stop();" onmouseout="this.start();">

<?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 5");

foreach ($result as $post) {

setup_postdata($post);

$postid = $post->ID;

$title = $post->post_title;

$commentcount = $post->comment_count;

if ($commentcount != 0) { ?>

<li><a href="<?php echo get_permalink($postid); ?>">

<font color="#FFFFFF"><?php echo $title ?> </font></a> <b><font color="#000000">|</font> </b></li>

<?php } } ?>

</marquee>

</div>

</div>

</div>

</div>

<div class="TopNavCotainerLeftCell">

<div class="Timenow">

<span><SCRIPT language="javascript">

function showdate() {

week= new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

a = new Date();

d= a.getDay();

day= a.getDate();

month = a.getMonth()+1;

year= a.getYear();

year = (year== 0)?2000:year;

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

document.write(week[d]+" "+day+" "+months[month-1]+" "+ year);

}

</SCRIPT>

<SCRIPT>showdate()</SCRIPT></span>

</div>

</div>

</div>

<div class="BodyCotainer">

<div class="ContentBodyCotainer">

<?php include (TEMPLATEPATH . '/rightbar.php'); ?>

<div class="BodyCotainerMiddleCell">

<?php include (TEMPLATEPATH . '/centerbox.php'); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div class="MiddleCotainer">

<div class="FullCotainer">

<div class="FullHead">

<strong><?php the_title(); ?></strong>

</div>

<div class="FullBody">

<div class="FullBodyContent">

<div class="componentheading">

<font color="#0B3768">دسته :</font> <?php _e(' ','dnld'); ?> <?php the_category(__('|'|' ')); ?>

<font color="#AE3738">|</font> <font color="#0B3768">بازدید :</font> <?php if(function_exists('the_views')) { the_views(); } ?></div>

<table class="blog" cellpadding="0" cellspacing="0" width="450">

<tr>

<td valign="top">

<div>

<table class="contentpaneopen">

<tr>

<td class="contentheading" width="100%">

<font color="#0B3768">نوشته شده توسط<span lang="en-us">:</span></font> <?php the_author(); ?>

</td>

<td align="right" width="100%" class="buttonheading">

<a title="<?php the_time('j F') ?>"><img src="<?php bloginfo('template_directory'); ?>/images/date_button.png" alt="" /></a> </td>

<td align="right" width="100%" class="buttonheading">

<a title="<?php the_time('g:i a'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/timeButton.png" alt="" /></a> </td>

<td align="right" width="100%" class="buttonheading">

<a href="<?php the_permalink() ?>" title="لینک ثابت"><img src="<?php bloginfo('template_directory'); ?>/images/linkButton.png" alt="لینک ثابت" /></a> </td>

</tr>

</table>

<div align="center">

<table class="contentpaneopen" width="450">

<tr>

<td valign="top">

<p><span style="font-family: tahoma,helvetica,sans-serif; font-size: 11px;"><span class="userContent"><span dir="rtl"><?php the_content(__('','dnld')); ?></span></span></span></p><br>

</td>

</tr>

<tr>

<td align="right">

<?php the_tags(__('برچسب ها : ','dnld'), __(', ','dnld'), __('<br />','dnld')); ?>

</td>

</tr>

<tr>

<td align="right">

<!-- START of joscomment -->

<div class='write_comment'>

<?php comments_popup_link('بدون نظر', 'يك نظر', '% نظر'); ?>

</div>

<!-- END of joscomment --></td>

</tr>

<tr>

<td align="left">

</td>

</tr>

</table>

</div>

<span class="article_separator"> </span>

</div>

</td>

</tr>

</table>

</div>

</div>

<div class="FullBottom"></div>

</div>

</div>

<?php endwhile; ?>

<?php else : ?>

هنوز مطلبی در سایت قرار داده نشده است.

<?php endif; ?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="20"> </td>

</tr>

<tr>

<td><center><div> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> </div></center></td>

</tr>

<tr>

<td height="20"> </td>

</tr>

</table>

<div class="MiddleCotainer">

<div class="MiddleRightBlockCotainer">

<div class="MiddleRightBlockHead">

<strong>نویسندگان</strong>

</div>

<div class="MiddleRightBlockBody">

<div class="MiddleRightBlockBodyContent">

<ul class="latestnews">

محل قرار دادن نام نویسندگان

</ul>

</div>

</div>

<div class="MiddleRightBlockBottom"></div>

</div>

<div class="MiddleLeftBlockCotainer">

<div class="MiddleLeftBlockHead">

<strong>آرشیو</strong>

</div>

<div class="MiddleLeftBlockBody">

<div class="MiddleLeftBlockBodyContent">

<ul class="latestnews">

<?php wp_get_jarchives('type=monthly'); ?>

</ul>

</div>

</div>

<div class="MiddleLeftBlockBottom"></div>

</div>

</div>

</div>

<?php include (TEMPLATEPATH . '/leftbar.php'); ?>

</div>

</div>

<div class="BottomCotainer"></div>

<div class="FooterCotainer">

<span>کليه حقوق مادي و معنوي اين وب سايت محفوظ مي باشد.</span><br/>

<span>درج مطالب در وب سايت ها، وبلاگ ها و نشريات با ذکـــر منبع مجاز است.</span><br>

<span>طراحی شده بوسیله <a href="http://wpdesign.ir/">وردپرس دیزاین</a></span>

</div>

</div>

<div class="CopyrightCotainer">

<div class="Copyright"><a href="<?php bloginfo('url') ?>" title="صفحه نخست" target="_blank"><em>صفحه

نخست</em></a></div>

</div>

<div class="google1">

<a href="http://wpdesign.ir/"><img src="<?php bloginfo('template_directory') ?>/images/wpdesign120.gif" width="80" height="80"></a>

</div>

<div style="display:none">

wpdesign.ir

</div>

</body>

</html>

اون بخش داغ کدهاش از

<div class="gk_news_highlighter" id="news-highlight-1"><div class="gk_news_highlighter" id="news-highlight-1">

شروع میشه

و میخواستم بپرسم که کدی که در قالب قرار میدی و نام مدیران را میاره چیست ؟؟؟

ویرایش شده توسط Morteza
لینک به ارسال

برای تاریخ تست کنید:

<?php get_header(); ?>

<body>

<div class="PageCotainer">

<div class="HeaderCotainer">

<p class="HeaderCotainerLogo"><a href="<?php bloginfo('url') ?>" target="_self" title="پارسی پالس"><em>

پارسی پالس</em></a></p>

</div>

<?php include (TEMPLATEPATH . '/topmenu.php'); ?>

<div class="TopNavCotainer">

<div class="TopNavCotainerRightCell"></div>

<div class="TopNavCotainerMiddleCell">

<div class="TopNavCotainerMiddleCellHot">

<div class="gk_news_highlighter" id="news-highlight-1">

<div class="gk_news_highlighter_interface">

<span class="text"> </span>

</div>

<div class="gk_news_highlighter_wrapper">

<marquee direction="right" scrollamount="5" scrolldelay="89" width="690" height=15 style="text-align:right;" onmouseover="this.stop();" onmouseout="this.start();">

<?php $result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 5");

foreach ($result as $post) {

setup_postdata($post);

$postid = $post->ID;

$title = $post->post_title;

$commentcount = $post->comment_count;

if ($commentcount != 0) { ?>

<li><a href="<?php echo get_permalink($postid); ?>">

<font color="#FFFFFF"><?php echo $title ?> </font></a> <b><font color="#000000">|</font> </b></li>

<?php } } ?>

</marquee>

</div>

</div>

</div>

</div>

<div class="TopNavCotainerLeftCell">

<div class="Timenow">

<span><?php echo jdate('Y m d'); ?></span>

</div>

</div>

</div>

<div class="BodyCotainer">

<div class="ContentBodyCotainer">

<?php include (TEMPLATEPATH . '/rightbar.php'); ?>

<div class="BodyCotainerMiddleCell">

<?php include (TEMPLATEPATH . '/centerbox.php'); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div class="MiddleCotainer">

<div class="FullCotainer">

<div class="FullHead">

<strong><?php the_title(); ?></strong>

</div>

<div class="FullBody">

<div class="FullBodyContent">

<div class="componentheading">

<font color="#0B3768">دسته :</font> <?php _e(' ','dnld'); ?> <?php the_category(__('|'|' ')); ?>

<font color="#AE3738">|</font> <font color="#0B3768">بازدید :</font> <?php if(function_exists('the_views')) { the_views(); } ?></div>

<table class="blog" cellpadding="0" cellspacing="0" width="450">

<tr>

<td valign="top">

<div>

<table class="contentpaneopen">

<tr>

<td class="contentheading" width="100%">

<font color="#0B3768">نوشته شده توسط<span lang="en-us">:</span></font> <?php the_author(); ?>

</td>

<td align="right" width="100%" class="buttonheading">

<a title="<?php the_time('j F') ?>"><img src="<?php bloginfo('template_directory'); ?>/images/date_button.png" alt="" /></a> </td>

<td align="right" width="100%" class="buttonheading">

<a title="<?php the_time('g:i a'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/timeButton.png" alt="" /></a> </td>

<td align="right" width="100%" class="buttonheading">

<a href="<?php the_permalink() ?>" title="لینک ثابت"><img src="<?php bloginfo('template_directory'); ?>/images/linkButton.png" alt="لینک ثابت" /></a> </td>

</tr>

</table>

<div align="center">

<table class="contentpaneopen" width="450">

<tr>

<td valign="top">

<p><span style="font-family: tahoma,helvetica,sans-serif; font-size: 11px;"><span class="userContent"><span dir="rtl"><?php the_content(__('','dnld')); ?></span></span></span></p><br>

</td>

</tr>

<tr>

<td align="right">

<?php the_tags(__('برچسب ها : ','dnld'), __(', ','dnld'), __('<br />','dnld')); ?>

</td>

</tr>

<tr>

<td align="right">

<!-- START of joscomment -->

<div class='write_comment'>

<?php comments_popup_link('بدون نظر', 'يك نظر', '% نظر'); ?>

</div>

<!-- END of joscomment --></td>

</tr>

<tr>

<td align="left">

</td>

</tr>

</table>

</div>

<span class="article_separator"> </span>

</div>

</td>

</tr>

</table>

</div>

</div>

<div class="FullBottom"></div>

</div>

</div>

<?php endwhile; ?>

<?php else : ?>

هنوز مطلبی در سایت قرار داده نشده است.

<?php endif; ?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="20"> </td>

</tr>

<tr>

<td><center><div> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> </div></center></td>

</tr>

<tr>

<td height="20"> </td>

</tr>

</table>

<div class="MiddleCotainer">

<div class="MiddleRightBlockCotainer">

<div class="MiddleRightBlockHead">

<strong>نویسندگان</strong>

</div>

<div class="MiddleRightBlockBody">

<div class="MiddleRightBlockBodyContent">

<ul class="latestnews">

محل قرار دادن نام نویسندگان

</ul>

</div>

</div>

<div class="MiddleRightBlockBottom"></div>

</div>

<div class="MiddleLeftBlockCotainer">

<div class="MiddleLeftBlockHead">

<strong>آرشیو</strong>

</div>

<div class="MiddleLeftBlockBody">

<div class="MiddleLeftBlockBodyContent">

<ul class="latestnews">

<?php wp_get_jarchives('type=monthly'); ?>

</ul>

</div>

</div>

<div class="MiddleLeftBlockBottom"></div>

</div>

</div>

</div>

<?php include (TEMPLATEPATH . '/leftbar.php'); ?>

</div>

</div>

<div class="BottomCotainer"></div>

<div class="FooterCotainer">

<span>کليه حقوق مادي و معنوي اين وب سايت محفوظ مي باشد.</span><br/>

<span>درج مطالب در وب سايت ها، وبلاگ ها و نشريات با ذکـــر منبع مجاز است.</span><br>

<span>طراحی شده بوسیله <a href="http://wpdesign.ir/">وردپرس دیزاین</a></span>

</div>

</div>

<div class="CopyrightCotainer">

<div class="Copyright"><a href="<?php bloginfo('url') ?>" title="صفحه نخست" target="_blank"><em>صفحه

نخست</em></a></div>

</div>

<div class="google1">

<a href="http://wpdesign.ir/"><img src="<?php bloginfo('template_directory') ?>/images/wpdesign120.gif" width="80" height="80"></a>

</div>

<div style="display:none">

wpdesign.ir

</div>

</body>

</html>

برای قسمت داغ شما فقط جا برای 1 پست دارید.

چطور میخواید چند پست نمایش داده بشه؟

و میخواستم بپرسم که کدی که در قالب قرار میدی و نام مدیران را میاره چیست ؟؟؟

نام مدیر یا نویسنده ها؟

لینک به ارسال

برای قسمت داغ شما فقط جا برای 1 پست دارید.

چطور میخواید چند پست نمایش داده بشه؟

نمیشه که مثلا عنوان 5 پست پر بازدید را گذاشت؟؟؟ الان من نمیدونم اون پستی که اونجا میاره به چه معیاریه !! چون پست پر بازدید نیستش!! من میخوام پست پر بازدید عنوانش اونجا بیاد!!

نام مدیر یا نویسنده ها؟

نام نویسنده ها + مدیر را با هم بیاره !!

ممنون :X

لینک به ارسال

الان براساس پرنظرترین پست میاره.

یا باید کد پربازدیدترین ها رو استفاده کنید یا افزونه ش رو.

برای نا نویسنده از تابع the_author استفاده کنید.

برای نمایش نام مدیران هم:

http://llamalabs.com/2009/09/05/monitoring-your-wordpress-administrator-user-list/

لینک به ارسال

الان براساس پرنظرترین پست میاره.

یا باید کد پربازدیدترین ها رو استفاده کنید یا افزونه ش رو.

من افزونه WP-PostViews را نصب کردم !! کدش را هم گذاشتم که کل قالب بهم ریخت!!! ^_^ :blink:

ویرایش شده توسط hossein98
لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...