Previous / Next Post

This topic contains 8 replies, has 2 voices, and was last updated by  Martin Stehle 5 months, 2 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4562

    Tim Neumann
    Participant

    Good Morning,

    I am hoping that I would be able to do the following with your plug-in…

    My intention is to use the plug-in, in widget mode, to create “Previous” and “Next” post links, in a specific post category. I have two “lists” created that are pretty close to that, would just like to know if there is a way I can make each list focused down to the ONE post before the one I am currently viewing and the ONE post after the one I am currently viewing. Ideally I could “dim” the link when no Previous or Next post is available in that category.

    Thanks,
    Tim

    #4563

    Martin Stehle
    Keymaster

    A paging navigation is not possible in widgets areas. It can be used in the post content only.

    #4564

    Tim Neumann
    Participant

    I am already using it as a widget and successfully navigating to post url’s from the widget area, so I am not sure I understand your comment above…

    I am looking to find out if there is a way to trim down the “list” results to one post, of either the previous post or the next post. As the list can be focused to a post category, and be ordered by post date, it seems as though this would be an easy thing to achieve. I have created one “list” for previous posts and one “list” for next posts, this would simply be a matter of limiting that list to one…the next or previous one.

    • This reply was modified 5 months, 3 weeks ago by  Tim Neumann.
    #4566

    Tim Neumann
    Participant

    I am going to throw out one additional thought here:

    Show only posts of and after the given date Enter a date in the format yyyy-mm-dd. E.g. 2019-01-05 for today.

    and

    Show only posts of and before the given date Enter a date in the format yyyy-mm-dd. E.g. 2019-01-05 for today.

    Both exist as options for filtering the “list” return. Is there a wildcard that can be used in this field, or a function that can be called. Returning the current system date and hiding the current post would be a step in the right direction. Especially if the return is limited to 1 post, which is a “list” option.

    The bottom line seems like all the necessary framework is there, just need to understand how to return posts in the desired date range and order, then limit the return to one…

    #4567

    Martin Stehle
    Keymaster

    Ah, now I am understanding your issue. My first idea is to add two new checkboxes: one for “Show only posts before the current date” and one for “Show only posts after the current date”. Would that help you?

    #4568

    Tim Neumann
    Participant

    Good afternoon, yes that would be perfect, that combined with the existing ability to limit the return post “set” to one would do the job!

    Thanks!

    #4569

    Martin Stehle
    Keymaster

    I pondered about the new options. They are nonsense. Because “Show only posts after the current date” is impossible. It is like looking into the future. And “Show only posts before the current date” is the standard way a list works.

    And you do not want a Prev/Next navigation for the current date but for the current post no matter which date it has.

    I took a deep research into custom Prev/Next links. This feature is not compatible to “Ultimate Post List Pro” and can be used only in post contents, not in widgets.

    #4570

    Tim Neumann
    Participant

    I think to say it is “nonsense” is a bit insulting. I don’t think you understand the possibilities here. It is not “like looking into the future”, though I can understand your confusion in regards to what I am asking.

    Whether you are looking backward or forwards is relative to the position you are in at the moment…let’s say I have the following posts:

    01/01/2019 12:00
    01/02/2019 12:00
    01/03/2019 12:00
    01/04/2019 12:00
    01/05/2019 12:00
    01/06/2019 12:00

    And my current post being viewed is:

    01/03/2018 12:00

    Then 01/02/2019 12:00 would be the previous post and 01/04/2019 12:00 would be my next post, depending upon date order. Essentially you are looking both backward and forward in the array of returned posts, relative to the position of the post that is currently being displayed. I have made the time portion of each post 12:00 for simplicity of explanation, but the same situation would work in the case of multiple posts made on the same date, they would still be ordered correctly and you could easily interrogate the array in either direction.

    From an architectural perspective, it really comes down to the communication capability between the post display and a widget (in this case yours…). I am unclear as to whether or not such data can be passed back and forth in WordPress.

    Food for thought…and at the same time, I will grant you that I may not understand the communications barriers between elements that make up a post.

    • This reply was modified 5 months, 3 weeks ago by  Tim Neumann.
    #4595

    Martin Stehle
    Keymaster

    I apologize for my expression “nonsense”. I did not want to insult you, but described my idea as it appeared to me after some reflection.

    I am still thinking about a solution for a Prev/Next feature. I am on duty so there will be no quick release for that. Please be patient.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.