WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove date sorting on a page-to-page basis (5 posts)

  1. ggg377
    Member
    Posted 1 year ago #

    Hi. I've set up date-based sorting for my loop. Posts get sorted under labels of "Today", "Yesterday" or "_date_" immediately after posting. The labels only appear once for each date and all posts made on that date fall under the label. The problem is, every time a page becomes full and the newly opened page has posts from a date that started on the last page, the label gets displayed again. Would it be possible to edit the code in such a way, that the label wouldn't be shown when opening a new page? For example: Page 1 ends with February, 2nd posts. 3 posts appear on page 1, 3 posts appear on page 2. Currently, February 2 would be shown on both, page 1 and page 2. The goal is to have it displayed only on page 1.

    Here's my index: http://pastebin.com/Pp0rA5j7
    Sample site: http://goldenred.web44.net

    I've set up an infinite scroll script for page switching with an item selector of label+post, but that doesn't seem to be a problem. Labels get displayed after every load as they would when switching pages.

    I would be really thankful if anyone could help.

  2. ggg377
    Member
    Posted 1 year ago #

    I'm trying to figure out if this would even be possible. From what I know, the loop gets reinitiated on new pages, so the new page and the previous page aren't really even connected in any way through code, so setting a condition to the new page based on the previous page would be impossible.

    It's starting to seem this kind of goal would be extremely difficult to achieve without doing some major coding. Can anyone please give me a slight idea what I'm standing up against or what codex entries I should be looking at?

  3. satyanayak
    Member
    Posted 1 year ago #

    hi everybody i have an issue with editor in my work on local host actually i have 2 descriptions in my post categories. once i have entered any text with p tags description1 is working fine where as description2 text p tags were not parsing that means it is display as shown below
    <p>test</p><p>test</p><p>test</p>
    the p tags were not showing the line breaks that means the editor p tags were not parsing. Could anyone please help me in this issue. I am very thank full if any one found the solution i have tried in somany ways. Another issue is if we use firebug and just delete one space in the above text it is showing the line breaks. Thank you.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    @satyanayak: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem - despite any similarity in symptoms - is likely to be completely different.

  5. satyanayak
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic