رفتن به مطلب

افزونه امتیازدهی بالا و پایین به پست


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

سلام

مدت هاست دنبال افزونه امتیاز دهی به پست ها هستم که مشکلی ایجاد نکنه.

الان از WTI-like-post استفاده میکنم.

چندیدن ارور html داره به علاوه ی

post-1392-0-77288400-1375353195_thumb.jp

ممنون میشم اگه یه افزونه خوب معرفی کنید.

لینک به ارسال

ممنون

دفعه پیش هم دوستان این افزونه رو معرفی کردند

اما بعد از دو روز نتونستم فعالش کنم.

مثل اینکه مجبورم فعالش کنم.

چجوری؟

لینک به ارسال

اساتید گفتند یه کدی رو باید تو حلقه بذارید.

اما حلقه رو پیدا نکردم.

شما چجوری راه انداختید؟

لینک به ارسال

بله من تو فایل index.php حلقه دارم.


<?php
if (have_posts()) : while (have_posts()) : the_post();
/**
* The default post formatting from the post.php template file will be used.
* If you want to customize the post formatting for your homepage:
*
* - Create a new file: post-homepage.php
* - Copy/Paste the content of post.php to post-homepage.php
* - Edit and customize the post-homepage.php file for your needs.
*
* Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
*/
get_template_part('post', 'homepage');

endwhile;

else :
get_template_part('post', 'noresults');
endif;

get_template_part('navigation');
?>

حالا کد زیر رو کجا بذارم؟


<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

لینک به ارسال

ممنون دوستان

دفعه پیش هم تا اینجا رسیدیم.

کد رو به صورت زیر قرار میدم:


if (have_posts()) : while (have_posts()) : the_post();
get_template_part('post', 'homepage');
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
endwhile;

سایت بالا نمیاد و ارور میده

[b]Parse error[/b]: syntax error, unexpected '<' in [b]/home/alamooti/public_html/alootorsh.ir/wp-content/themes/alamooti/index.php[/b] on line [b]15[/b]

لینک به ارسال

بله من تو فایل index.php حلقه دارم.


<?php
if (have_posts()) : while (have_posts()) : the_post();
/**
* The default post formatting from the post.php template file will be used.
* If you want to customize the post formatting for your homepage:
*
* - Create a new file: post-homepage.php
* - Copy/Paste the content of post.php to post-homepage.php
* - Edit and customize the post-homepage.php file for your needs.
*
* Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
*/
get_template_part('post', 'homepage');

endwhile;

else :
get_template_part('post', 'noresults');
endif;

get_template_part('navigation');
?>

حالا کد زیر رو کجا بذارم؟


<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

شما یه فایل به اسم post.php یا homepage.php در قالبتون دارین؟محتویات اون فایل رو اینجا بزارین تا کمکتون کنیم.

لینک به ارسال

این post.php

اما while نداره


<?php global $theme; ?>

<div <?php post_class('post clearfix'); ?> id="post-<?php the_ID(); ?>">

<h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

<div class="postmeta-primary">

<span class="meta_date"><?php the_time('j , F , Y'); ?></span>
  <span class="meta_time"><?php echo get_the_date(); ?></span>
  <span class="meta_author">فرستنده : <?php the_author_posts_link(); ?></span>
<?php if(comments_open( get_the_ID() )) {
?>   <span class="meta_comments"><?php comments_popup_link( __( 'بدون نظر', 'themater' ), __( 'یک نظر', 'themater' ), __( '% نظر', 'themater' ) ); ?></span><?php
}

if(is_user_logged_in()) {
?>   <span class="meta_edit"><?php edit_post_link(); ?></span><?php
} ?>
</div>

<div class="entry clearfix">

<?php
if(has_post_thumbnail()) {
?><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(
array($theme->get_option('featured_image_width'), $theme->get_option('featured_image_height')),
array("class" => $theme->get_option('featured_image_position') . " featured_image")
); ?></a><?php
}
?>

<?php
the_content('');
?>
</div>

<?php if($theme->display('read_more')) { ?>
<div class="readmore">
<a href="<?php the_permalink(); ?>#more-<?php the_ID(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php $theme->option('read_more'); ?></a>
</div>
<?php } ?>

</div><!-- Post ID <?php the_ID(); ?> -->

لینک به ارسال

خودشه هر جایی که میخواین کد رو بزارین البته مواظب شرط ها باشین که خراب نشن.

مثلا اگه میخواین بعد از عنوان بیاد بعد از کد زیر بزارینش.


<div class="postmeta-primary">

قبل از تاریخ میاد.

بهتره یه استایل هم براش بزارین.

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

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

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

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

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

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

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

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

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

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