Support » Plugin: Unlist Posts & Pages » Previous Post, Next Post Links

  • Resolved rcain

    (@rcain)


    Hi there,

    Very nice, simple plugin, that works – many thanks.

    One issue I’ve found: ordinarily it seems to operate correctly on the Previous Post, Next Post Links when viewing posts, BUT, unlisted posts DO seem to appear as previous/next post links IFF one is already viewing an unlisted post!

    ie: if several unlisted posts are next to each other in the timeline, then they will each appear as previous/next links. Far from desirable.

    Any chance this could be fixed?

    Many thanks

    • This topic was modified 9 months, 3 weeks ago by rcain.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter rcain

    (@rcain)

    update:

    I’ve fixed the issue by modifying your code slightly: vis:

    file: /unlist-posts/class-unlist-posts.php ::
    class: Unlist_Posts :

    function: post_navigation_clause :
    line: 131 (approx):

    
    ...
    // mod jrc 030621: fixup for visibility of other hidden whilst viewing hidden: 
    // orig: if ( ( is_admin() && ! wp_doing_ajax() ) || in_array( get_the_ID(), $hidden_posts, true ) || empty( $hidden_posts ) ) {
    if ( ( is_admin() && ! wp_doing_ajax() ) || empty( $hidden_posts ) ) {
    // end mod jrc 030621: 
    ...
    

    function: comments_clauses :
    line: 207 (approx) :

    
    ...
    // mod jrc 030621: fixup for visibility of other hidden whilst viewing hidden: 			
    // orig: if ( ( is_admin() && ! wp_doing_ajax() ) || in_array( get_the_ID(), $hidden_posts, true ) || empty( $hidden_posts ) ) {
    if ( ( is_admin() && ! wp_doing_ajax() ) || empty( $hidden_posts ) ) {
    // end mod jrc 030621:
    ...	
    

    done: tested – all seems to work as required – ok
    todo: i wonder if you could take a quick look at this and check there aren’t any undesirable side effects that I’ve overlooked. If all is OK with you, wonder if you could apply change to next release?

    Thanks again

    Rob Cain

    • This reply was modified 9 months, 3 weeks ago by rcain.

    Hello @rcain

    Thanks for bringing this to our notice.

    We could confirm the same and the solution works as well.

    This should be fixed after further testing and an update will be available soon.

    Much appreciated to bringing this to us. 🙂 Do mark the topic as resolved once the issue has been resolved.

    Plugin Author Nikhil Chavan

    (@nikschavan)

    Hello,

    This has been fixed in the last update of the plugin – https://wordpress.org/plugins/unlist-posts/#developers

    Please update the plugin to have this working for you 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Previous Post, Next Post Links’ is closed to new replies.