رفتن به مطلب

مشکل در نشان دادن تاریخ مطالب


saeedsaeed

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

محتوای فایل php صفحه رو میشه قرار بدین تا بررسی بشه

لینک به ارسال

کد مربوط به صفحه index.php

<?php global $theme; get_header(); ?>
<div id="main">

<?php $theme->hook('main_before'); ?>
<div id="content">

<?php $theme->hook('content_before'); ?>

<?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 $theme->hook('content_after'); ?>

</div><!-- #content -->

<?php get_sidebars(); ?>

<?php $theme->hook('main_after'); ?>

</div><!-- #main -->

<?php get_footer(); ?>

لینک به ارسال

این صفحه ها رو نداره فکر کنم این باشه

<?php if (  $wp_query->max_num_pages > 1 ) { ?>
<div class="navigation clearfix">

<?php
if(function_exists('wp_pagenavi')) {
wp_pagenavi();
} else {
?><div class="alignleft"><?php next_posts_link( __( '<span>«</span> Older posts', 'themater' ) );?></div>
<div class="alignright"><?php previous_posts_link( __( 'Newer posts <span>»</span>', 'themater' ) );?></div><?php
} ?>

</div><!-- .navigation -->

<?php } ?>

یا این

<?php global $theme; ?>

<div <?php post_class('post page clearfix'); ?> id="post-<?php the_ID(); ?>">
<h2 class="title"><?php the_title(); ?></h2>

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

<div class="entry clearfix">

<?php
if(has_post_thumbnail()) {
the_post_thumbnail(
array($theme->get_option('featured_image_width_single'), $theme->get_option('featured_image_height_single')),
array("class" => $theme->get_option('featured_image_position_single') . " featured_image")
);
}
?>

<?php
the_content('');
wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages:', 'themater' ) . '</strong>', 'after' => '</p>' ) );
?>
</div>

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

لینک به ارسال

با توضیحات موجود در لینک ارسال شده در پست دوم به احتمال زیاد درست میشه.اگه درست نشد،توی فایل های single.php یا home.php یا index.php و هر جایی که از توابع تاریخ استفاده شده دنبال کد date یا the_date بگردید.

لینک به ارسال

با توضیحات موجود در لینک ارسال شده در پست دوم به احتمال زیاد درست میشه.اگه درست نشد،توی فایل های single.php یا home.php یا index.php و هر جایی که از توابع تاریخ استفاده شده دنبال کد date یا the_date بگردید.

تغییر دادم نشد توی این date iهست

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

<h2 class="title"><?php the_title(); ?></h2>

<?php
if(has_post_thumbnail()) {
the_post_thumbnail(
array($theme->get_option('featured_image_width_single'), $theme->get_option('featured_image_height_single')),
array("class" => $theme->get_option('featured_image_position_single') . " featured_image")
);
}
?>

<div class="postmeta-primary">
<span class="meta_date"><?php echo get_the_date(); ?></span>
  <span class="meta_categories"><?php the_category(', '); ?></span>
<?php if(is_user_logged_in()) {
?>   <span class="meta_edit"><?php edit_post_link(); ?></span><?php
} ?>
</div>

<div class="entry clearfix">

<?php
the_content('');
wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages:', 'themater' ) . '</strong>', 'after' => '</p>' ) );
?>

</div>

<?php if(get_the_tags()) {
?><div class="postmeta-secondary"><span class="meta_tags"><?php the_tags('', ', ', ''); ?></span></div><?php
}
?>


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

<?php
if(comments_open( get_the_ID() )) {
comments_template('', true);
}
?>

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

یک ت به ابتدای date در


<?php echo get_the_date(); ?>

اضافه کنید و تست کنید ، به این صورت :


<?php echo get_the_jdate(); ?>

لینک به ارسال

این تابع رو جایگزین کنید


<?php the_time('j M, Y'); ?>

ممنون درست شد فقط یه مشکل دیگه هست توی ادامه مطلب درسته ولی صفحه اصلی نه

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

توی صفحه اصلی هم تابع رو پیدا و جایگزین کردید؟

لینک به ارسال

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

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

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

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

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

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

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

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

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