Как настроить домашнюю страницу WordPress? - PullRequest
0 голосов
/ 04 апреля 2011

Я новичок в WordPress, и я создаю сайт с использованием WordPress.

Вы можете увидеть макет страницы здесь http://www.site2preview.com/veejata/ver1/index.html

И я изменил index.php как

<?php
get_header(); 

//get_template_part( 'loop', 'index' );
?>

<div class="flt_left"> 
    //dummy welcome text ..
</div>
<div class="flt_left">
    //dummy latest post..
</div>

<?php get_sidebar(); ?>
<?php get_advt(); ?>
<?php get_footer(); ?>

Теперь я хочу знать, как создать пользовательскую страницу или блок и как я могу включить их в index.page ..

Также я хочу, чтобы пользователь мог редактировать фиктивный текст приветствия из панели администратора.

В общем, я хочу how to split the contents in the wordpress и how to make them editable by admin и how to include them in the pages ...

1 Ответ

1 голос
/ 04 апреля 2011

Это то, что вы должны иметь в своем простом файле index.php (из классической темы WordPress):

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>    
<?php the_date('','<h2>','</h2>'); ?>    
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
     <h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark">
     <?php the_title(); ?></a></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> 
      &#8212; <?php the_tags(__('Tags: '), ', ', ' &#8212; '); ?> 
      <?php the_author() ?> @ 
      <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div>    
    <div class="storycontent">
        <?php the_content(__('(more...)')); ?>
    </div>    
    <div class="feedback">
      <?php wp_link_pages(); ?>
      <?php comments_popup_link(__('Comments (0)'), 
           __('Comments (1)'), __('Comments (%)')); ?>
    </div>    
</div>    
<?php comments_template(); // Get wp-comments.php template ?>    
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

Я бы посоветовал вам сначала прочитать это: http://codex.wordpress.org/Theme_Development

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...