Viewing 15 replies - 1 through 15 (of 16 total)
  • WebSprite

    (@contentsprite)

    I am also having this issue. The link to more or page 2 etc all go to the current page instead of the right link. I’ve tried simple to complex configurations but I’m stumped.

    The link generated for page 2, for example is:

    http://localhost/my-site/?lcp_page1=2#lcp_instance_1

    WebSprite

    (@contentsprite)

    This is the code I have pasted on a custom-post-type, page-type and post-type entries to no avail in the most recent version of WordPress, testing with Chrome and Firefox:

    [catlist fade=true categorypage=yes offset=0 excerpt=yes excerpt_size=30 instance=1 tags="reviews,awards" pagination=yes numberposts=3 orderby=rand]

    I’ve tried permutations of numberposts and orderby and instance and excerpt codes as well, altering and removing them. I have wondered if the fact that I’m in a localhost environment is the problem but I don’t see how that would affect the link for next page.

    I’ve also looked in vain for anyone posting to a live site running this plugin with pagination so I can actually see what the link ought to be instead of what my site is generating, which might provide a clue. As I said in the previous post, the code generated for page 2 is:

    http://localhost/hello-world/?lcp_page1=2#lcp_instance_1

    which upon clicking takes you to the first item of the list. Page 3’s code is exactly the same except the 2 is a 3. And so on regardless of how many pages.

    I experimented and found out that removing the Anchor (starting with #) did the trick.
    After editing lcp_catlistdisplayer.php, pagination works as it should on my site:

    $amp . “lcp_page” . $this->catlist->get_instance() . “=”. $page /* . DOT COMMENTED OUT */
    /* “#lcp_instance_” . $this->catlist->get_instance() COMMENTED OUT UP TO SREMICOLON */ ;

    An update will overwrite this. Maybe install “Block Plugin Update” until it’s fixed.

    • This reply was modified 7 years, 6 months ago by Anton_Th.
    WebSprite

    (@contentsprite)

    Thank you thank you thank you! The code worked and your details helped me find it easily. I am hoping the next upgrade will tweak this or sort it out, meanwhile, I’ve taken it off auto update.

    Thanks again!

    Great to hear that it helped you! For me it was temporary because the ‘show full content’ option in my theme was discontinued so I had to use this plug-in. But the functionality is restored now in the latest update. So much for hours of reverse engineering 😉

    Hi guys,

    I’m having the same issue. I tried to edit lcp_catlistdisplayer.php by copying and pasting Anton’s code to overwrite the default 2 lines, however, I got a 500 error.

    Luckily I’d copied the original code from lcp_catlistdisplayer.php elsewhere and was able to restore the file via FTP.

    I’m pretty green at editing PHP. Any idea what I may have did wrong? Via the plug-in setting in WP I copied the original code into sublime then edited the 2 lines. I then pasted it back into WP. Which is when I broke everything!

    Any help greatly appreciated. I really like this plug-in, really hope I can get the pagination to work.

    Thanks!

    It could be that the plugin was updated since last month and the code changed. I can’t tell, I don’t use the plugin anymore.
    If not, my guess is that you forgot the semicolon ; after $page on the first line.
    Check carefully or
    method A. simply copy/paste my two lines from above to replace the original two lines.
    method B. replace the ending dot of the first line by a semicolon ; and Delete the whole second line.

    As always make sure to have a backup of the original!

    Many thanks for the prompt reply, I tried all variations you mentioned, but always get the 500. I notice via WP that cp-catlistdisplayer.php says it’s “inactive”. Could that be the problem?

    Except for the pagination the plug-in seems to be working normally.

    Editing list-category-posts/include/lcp-catlistdisplayer.php (inactive)
    Select plugin to edit: Select

    Sorry I can’t help you, it was just a quick fix that I discovered and shared… I don’t use the plugin anymore. You could check whether the original file isn’t reported as “inactive”. Otherwise I still suspect that it’s an editing issue or maybe your editor reformats the file. Try to insert just a comment and re-save, see if that still works. I wouldn’t know, just guessing – and make sure that the plugin isn’t updated since last month, that could also invalidate the fix. Hope you’ll get it working because I remember how annoying it is.

    Thanks for your help Anton, much appreciated. I’ve also emailed the developer so hopefully we get some resolution. Did you find a replacement plug-in?

    No, I use a theme that comes with a blog module. But it was crippled after an update (they disabled the ‘show full blog’ listing option) so I had to look for alternatives. The ‘full blog’ functionality is back now. However I might need similar plugins in the future so I hope that this one does what it promises by that time. Good luck!

    I’m gonna try find a new plug-in, I do like this plug-in but without the pagination its no use to me. Hopefully the developers get back to me though.

    WebSprite

    (@contentsprite)

    Hi Scotty, don’t know if this will help. I saved this info in a text file so I wouldn’t forget what I’d changed in case the plug-in updated. To my knowledge it has not updated. The code still works for me:

            $amp . "lcp_page" . $this->catlist->get_instance() . "=". $page /*DOT COMMENTED OUT. */
    /*        "#lcp_instance_" . $this->catlist->get_instance() COMMENTED OUT UP TO SEMICOLON*/;
    
    original code
    
            $amp . "lcp_page" . $this->catlist->get_instance() . "=". $page . 
            "#lcp_instance_" . $this->catlist->get_instance();
    

    I put a screen snap of my edited plugin file in my public dropbox. Let me know when you’ve had a chance to pull it to your own drive so I can delete it again. You’ll see in the snap that my php file also says “inactive” so that’s not the issue.

    https://dl.dropboxusercontent.com/u/49677933/Capture.JPG

    I hope this helps you out.

    So it’ll remain a mystery why the fix doesn’t work. You don’t have a security plugin that blocks altered php-files? And your .php file is still plain text, no formatting added? No semicolon forgotten or left a full stop where it doesn’t belong? Let me know if you find a good alternative. I had trouble finding one.

    WebSprite

    (@contentsprite)

    php can be really frustrating – a slanted quote instead of a plain one can throw the whole site off.

    I too would like to hear if you find an alternative. This seems like a basic content management functionality.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Pagination links scroll to top of same page’ is closed to new replies.