• Решено steven22

    (@steven22)


    Подскажите плиз как настроить перелистывание страниц ( у меня просто все статьи построены в ряд на главной странице а я хочу чтоб были только рубрики и затем статьи можно было бы переключать с помощью кнопок с номерами страниц), я где-то прочитал что для этого нужен плагин WP Page Numbers, я его установил и активировал в админке, вот только не знаю как его настроить.
    на форуме такого вопроса я не нашёл
    http://www.steven22.ru
    заранее спасибо
    е-мэйл steven22@bk.ru

Просмотр 8 ответов — с 1 по 8 (всего 8)
  • Atrax

    (@atrax)

    Ethical engineer

    У плагина есть readme.txt
    Потрудитесь его прочитать.

    Автор steven22

    (@steven22)

    всё.
    я всё прочитал.

    == Installation ==

    1. Upload the FOLDER ‘wp-page-numbers’ to the /wp-content/plugins/—ок
    2. Activate the plugin ‘WP Page Numbers’ through the ‘Plugins’ menu in admin—ок
    3. Go to ‘Options’ or ‘Settings’ and then ‘WP Page Numbers’ to change the options—проблемка
    ——————————————
    Instructions — Code to add to your theme
    Add the code where you find previous_post() and next_post() functions. If you can’t find these tags, place the code between endwhile; and endif; in the_loop.

    Code to add in your theme
    <?php if(function_exists(‘wp_page_numbers’)) : wp_page_numbers(); endif; ?>

    Advanced (optional) settings

    Syntax: wp_page_numbers($start, $end); Example: wp_page_numbers(«<div class=’start’>», «</div>»);
    ————————————я не понимаю куда надо вставлять и какой код…
    там на писано»… where you find previous_post() and next_post() functions…» — где это искать?
    в админке в папке ../wp-content/plugins/wp-page-numbers
    в коде файла wp-page-numbers.php часто встречается слово function
    function wp_page_numbers_stylesheet()…function wp_page_numbers_check_num($num)…function wp_page_numbers_prevpage($paged, $max_page, $prevpage)….И Т. Д. но там нету «previous_post() and next_post() functions»
    я что-то не понимаю, не могли бы вы подробнее объяснить, а главное как можно проще!
    ps всё таки как мне сделать что бы у меня не было огромной главной страницы со всеми статьями и как вывести распр на рубрики на бок панель? спасибо

    Atrax

    (@atrax)

    Ethical engineer

    /wp-content/themes/ваша тема/index.php

    Автор steven22

    (@steven22)

    <?php get_header(); ?>
    <div id=»content»>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <h2>«><?php the_title(); ?></h2>
    <?php the_content(‘Read more…’); ?>
    <p>» rel=»bookmark» title=»Permanent Link to <?php the_title_attribute(); ?>»>Permalink | <?php the_tags(‘Tags: ‘, ‘, ‘, »); ?> | Posted in <?php the_category(‘, ‘) ?> | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></p>
    <?php endwhile; ?>
    <?php if(function_exists(‘wp_page_numbers’)) : wp_page_numbers(); endif; ?>
    <?php else : ?>
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that isn’t here.

    <?php endif; ?>
    <h5><?php posts_nav_link(‘ — ‘, __(‘« Newer Posts’), __(‘Older Posts »’)); ?></h5>
    </div>
    <?php get_sidebar(); ?>
    <div id=»clearfooter»></div>
    </div>
    <?php get_footer(); ?>

    Atrax

    (@atrax)

    Ethical engineer

    <?php posts_nav_link(' — ', __('« Newer Posts'), __('Older Posts »')); ?>
    Вот здесь…

    Автор steven22

    (@steven22)

    а именно где?
    т.е. между какими символами?

    Автор steven22

    (@steven22)

    я вставил между
    …Newer Posts’)и , __(‘Older Posts…
    т.е.
    <?php posts_nav_link(' — ', __('&laquo; Newer Posts')<?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>, __('Older Posts &raquo;')); ?>
    ———————————————
    сайт не открывается(белая страница)

    Автор steven22

    (@steven22)

    теперь вставил ровно перед <?php posts_nav_link(' — ', __('« Newer Pos...... и получилось:
    <h5><?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?><?php posts_nav_link(' — ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?></h5>
    сайт открылся но ничего не изменилось

Просмотр 8 ответов — с 1 по 8 (всего 8)

Тема «КАК НАСТРОИТЬ WP Page Numbers?» закрыта для новых ответов.