Поддержка Разное WordPress the_content Второй параметр $stripteaser

  • Приветствую.
    Поясните, что конкретно задает параметр $stripteaser у the_content?
    В Кодекс не отсылать, там читал — не понял.

Просмотр 4 ответов — с 1 по 4 (всего 4)
  • Модератор Sergey Biryukov

    (@sergeybiryukov)

    Live and Learn

    Скрывает текст перед тегом <!--more-->, если он есть. Аналогичен тегу <!--noteaser--> в самой записи.

    OK, цикл:

    if (have_posts()) {
      while (have_posts()) : the_post();
    ...
        the_content('Подробнее', true);
    ...
      endwhile;
    }

    Текст записи:

    All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother.
    
    <!--more-->
    
    I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, "Oh, why can't you remain like this for ever!" This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.

    Текст до more по-прежнему виден. Что я делаю не так?

    Модератор Yuri

    (@yube)

    Это работает при выводе одиночной записи (is_singular), но не списков. И, разумеется, на «обычных» Темах.

    работает при выводе одиночной записи, но не списков

    Спасибо, вопрос решен.

Просмотр 4 ответов — с 1 по 4 (всего 4)
  • Тема «WordPress the_content Второй параметр $stripteaser» закрыта для новых ответов.