WordPress.org

Ready to get started?Download WordPress

Forums

Post Tiles
Pagination (10 posts)

  1. alkos23
    Member
    Posted 1 year ago #

    Hi!

    Cool new feature, a must-have for my website (2000+ posts)!

    Little bug found: when you switch from page one to page two here :
    http://alkos.info/wp/category/padarchive

    instead of "http://alkos.info/wp/category/padarchive/page/2" the link is "http://alkos.info/wp/category/padarchivepage/2" - one slash is missing.

    However when switching from any subsequent page to another it is fine.

    Also, any idea how to make the page menu appear both on the top and the bottom of thumbnails?

    Cheers!
    Alek

    http://wordpress.org/extend/plugins/post-tiles/

  2. alkos23
    Member
    Posted 1 year ago #

    Ok, I solved the first issue by installing this plugin: http://wordpress.org/extend/plugins/permalink-trailing-slash-fixer/

    However, I never had any problem with the lack of the trailing slash before.

    Also, I've made the top and bottom nav buttons by changing the following in post-tiles.php :

    return $key_finished.'<ul id="post-tiles" '.$responsive.'>'.$output.''.$pagination;

    to

    return $key_finished. $pagination.'<ul id="post-tiles" '.$responsive.'>'.$output.''.$pagination;

    However I do not like the idea of modyfing the plugin code. Is there any way to do this via CSS?

  3. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    Interesting. I'll look into the fix. Thanks for taking extra effort to look into it. When I implemented the Pagination it kept adding an additional /. I had a sneaky suspicion that there might be a reason.

    You moved the pagination correctly. That's what it would take. I could add the admin control to turn bottom, top, both and then output the pagination at the beginning, end or both. That shouldn't be too difficult. Maybe I can implement it while I fix the / issue.

    Thanks for using the plugin and alerting me of the bug.

  4. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    Could you try disabling the trailing slash fixer and replace the following lines of code to see if this solves it for you.

    Replace lines 464 - 469.

    Current

    // If the total of pages is greater than one create the pagination
    if ($total_pages > 1){
    $current_page = max(1, get_query_var('paged'));
    $pagination = paginate_links(array(
    'base' => get_pagenum_link(1) . '%_%',
    'format' => 'page/%#%',

    New

    // Fix the url leading slash
    $url = get_permalink();
    $lastchar = substr( $url, -1 );
    if ( $lastchar != '/' ){
       $format = "/page/%#%";
    } else {
       $format = "page/%#%";
    }
    // If the total of pages is greater than one create the pagination
    if ($total_pages > 1){
       $current_page = max(1, get_query_var('paged'));
       $pagination = paginate_links(array(
       'base' => get_pagenum_link(1) . '%_%',
       'format' => $format,

    Basically I'm pulling the urls to see if it ends in a / and then serving up the appropriate format in the paginate_links array.

  5. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    Do you think the pagination on the top should go above or below the category key? I'm testing it in both and I think it makes more sense above the category key. What are your thoughts?

  6. alkos23
    Member
    Posted 1 year ago #

    Hi Ethan!

    Thank you for your swift response! For my layout it would look better under the category key, but I guess many would have different opinion on this ;-)

    Meanwhile I switched back to the old look without your plugin - unfortunately I have no time to work on it :-/

  7. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    I updated the plugin and made it so that users could choose the placement of the category key. Top, bottom or both.

  8. alkos23
    Member
    Posted 1 year ago #

    Yep, I've noticed, thanks a lot!

    Still trying to find some time to work on my layout :->

  9. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    I'll leave this post open for a while. Please let me know if you're able to get it to work.

  10. complanboy2
    Member
    Posted 1 year ago #

    Hi Ethan,

    Thank you for this Plugin. Its of great help.

    I've faced the same pagination issue.
    (The change mentioned is included in the latest version).

    &paged=2
    My blog urls include this 'paged=2' string, which is denying with the constant mentioned in the plugin change.. page/2 or /page/2

    Anyhow, I modified the code with corresponding change in the post-tiles.php. Its working fine now.
    Thought of informing. Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags