رفتن به مطلب

قالب برگه ها


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

این قابلیت بستگی به قالب شما دارد که ممکن هست چندین قالب مجزا برای برگه ها در نظر گرفته شده باشد. اگر چنین قالب هایی وجود داشت از بخش صفات برگه قالب مورد نظر را می توانید انتخاب کنید.

post-412-0-02452800-1356771108_thumb.png

  • امتیاز 3
لینک به ارسال

سلام

در تنظیمات ویرایشگر قسمت قالب یه قسمتیش نوشته پوسته برگه که کد زیر توشه


<?php
/*
* @template Mystique
* @revised October 30, 2011
* @author digitalnature, http://digitalnature.eu
* @license GPL, http://www.opensource.org/licenses/gpl-license
*/
// Single column page layout.
// This is a custom page template.
/* Template Name: 1 column page (no sidebars) */
?>
<?php
// force gettext parsers to include this string
if(true === false)
atom()->t('1 column page (no sidebars)');
include 'page.php'; // same, because we only use the file name to decide the layout type to apply

و چند جا هم نوشته قالب برگه

من با ویرایش کدام می تونم قالب برگم را کلا عوض کنم؟

لینک به ارسال

شما منظورتون کدهای داخلی برگه هست؟

معمولا با نام page.php هست.

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

Template Name:...

  • امتیاز 1
لینک به ارسال
ارسال شده در (ویرایش شده)

شما منظورتون کدهای داخلی برگه هست؟

معمولا با نام page.php هست.

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

Template Name:...

نه در مدیریت نمایش پوسته ها قسمت ویرایشگر در سمت چپ نوشته بود قالب برگه و پوسته برگه

کداش این جوریه

این مال قالب برگه است

<?php

// force gettext parsers to include this string

if(true === false)

atom()->t('Blog archives grouped by month');

atom()->template('header');

global $wp_locale, $post;

$month = $year = 0;

$post_type = atom()->post->getMeta('post_type');

$limit = (int)atom()->post->getMeta('limit');

$archives = new WP_Query(array(

'post_type' => ($post_type !== false) && post_type_exists($post_type) ? $post_type : 'post',

'ignore_sticky_posts' => true,

'posts_per_page' => $limit ? $limit : -1,

'orderby' => 'date',

'order' => 'DESC',

));

?>

<!-- main content: primary + sidebar(s) -->

<div id="mask-3" class="clear-block">

<div id="mask-2">

<div id="mask-1">

<!-- primary content -->

<div id="primary-content">

<div class="blocks clear-block">

<?php atom()->action('before_primary'); ?>

<?php the_post(); ?>

<?php atom()->action('before_post'); ?>

<!-- post -->

<article id="post-<?php the_ID(); ?>" <?php post_class('primary'); ?>>

<?php if(!atom()->post->getMeta('hide_title')): ?>

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

<?php endif; ?>

<div class="clear-block">

<?php the_content(); ?>

<?php while($archives->have_posts()): ?>

<?php

atom()->resetCurrentPost();

$archives->the_post();

$time = array('month' => get_the_date('n'), 'year' => get_the_date('Y'));

// display title if the month or year have changed

if(($month !== $time['month']) || ($year !== $time['year'])){

// close list if this is not the first section (there were items before)

if(($month !== 0) && ($year !== 0))

echo '</ul>';

extract($time);

echo '<h2 class="title">'.wptexturize(atom()->t('%1$s %2$d', $wp_locale->get_month($month), $year)).'</h2>';

echo '<ul class="posts">';

}

?>

<li>

<p>

<?php atom()->post->date(atom()->t('D jS')); ?>: <a href="<?php atom()->post->URL(); ?>"><?php atom()->post->Title(70); ?></a> (<?php atom()->post->CommentCount(); ?>)

</p>

</li>

<?php endwhile; ?>

<?php atom()->resetCurrentPost(); ?>

</div>

<?php atom()->post->pagination(); ?>

<?php atom()->controls('post-edit'); ?>

</article>

<!-- /post -->

<?php atom()->action('after_post'); ?>

<?php atom()->template('meta'); ?>

<?php atom()->action('after_primary'); ?>

</div>

</div>

<!-- /primary content -->

<?php atom()->template('sidebar'); ?>

</div>

</div>

</div>

<!-- /main content -->

<?php atom()->template('footer'); ?>

و این مال پوسته برگه که البته یه نمونشه چند تا هست

<?php

/*

* @template Mystique

* @revised December 20, 2011

* @author digitalnature, http://digitalnature.eu

* @license GPL, http://www.opensource.org/licenses/gpl-license

*/

// The "page" post type.

// pagename.php, page-slug.php, page-id.php or page-custom_template can override it.

?>

<?php atom()->template('header'); ?>

<!-- main content: primary + sidebar(s) -->

<div id="mask-3" class="clear-block">

<div id="mask-2">

<div id="mask-1">

<!-- primary content -->

<div id="primary-content">

<div class="blocks clear-block">

<?php atom()->action('before_primary'); ?>

<?php the_post(); ?>

<?php atom()->action('before_post'); ?>

<!-- page content -->

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

<?php if(!atom()->post->getMeta('hide_title')): ?>

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

<?php endif; ?>

<div class="clear-block">

<?php the_content(); ?>

</div>

<?php atom()->post->pagination(); ?>

<?php atom()->controls('post-edit'); ?>

</div>

<!-- /page content -->

<?php atom()->action('after_post'); ?>

<?php atom()->template('meta'); ?>

<?php atom()->action('after_primary'); ?>

</div>

</div>

<!-- /primary content -->

<?php atom()->template('sidebar'); ?>

</div>

</div>

</div>

<!-- /main content -->

<?php atom()->template('footer'); ?>

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

اسمش به لاتین نیست این جوریه:

پوسته برگه

(templates/page.php

column page (left sidebar) قالب برگه

(templates/page-c2left.php

لینک به ارسال

لطفا برای ارسال دیدگاه وارد شوید

شما بعد از اینکه وارد حساب کاربری خود شدید می توانید دیدگاهی ارسال کنید



ورود به حساب کاربری
×
×
  • اضافه کردن...