• Hi, I can’t get the Basel Theme pagination overwritten. What code should I use for the blog pages, and where should I insert it. Thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author AlanP57

    (@alanp57)

    To remove the theme pagination, you can use some custom CSS code:

    .basel-pagination {
        display: none;
    }

    You can place it in the Custom CSS section of your theme options.

    For inserting WP Paginate, have you tried setting WP Paginate location and position?

    Thread Starter miratuweb

    (@miratuweb)

    Yes, I tried with all the options in the settings, but it doesn’t work.
    Thanks

    Plugin Author AlanP57

    (@alanp57)

    If you can determine which page template is used by your blog, it may be the index.php file. Make a backup copy of the file to easily undo any changes you make. Then edit the file and above the line:

    <div class="basel-pagination">

    add this code:

    <?php 
    if(function_exists('wp_paginate')) {
      wp_paginate();	
    }  
    ?>

    Note, if you update your theme, these changes will be overwritten.

    • This reply was modified 4 years, 2 months ago by AlanP57.
    Thread Starter miratuweb

    (@miratuweb)

    Hi, this is the code, but it doesn’t work. If I insert your code the site crashes.

    if(1 != $pages)
    {
    echo “<div class=’basel-pagination’>”;
    if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo “«“;
    if($paged > 1 && $showitems < $pages) echo ““;

    for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    if ( $paged == $i ) {
    echo “<span class=’current’>”.$i.”</span>”;
    } else {
    echo ““.$i.”“;
    }
    }
    }

    if ($paged < $pages && $showitems < $pages) echo ““;
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo “»“;
    echo “</div>\n”;
    }

    Plugin Author AlanP57

    (@alanp57)

    The code I provided would work if inserted into HTML code, but I see the section of code you have is all PHP.

    I think you can try commenting out (with double slashes //) all the lines of code from

    if(1 != $pages)
    {

    till the last matching
    }

    and above if(1 != $pages) insert this PHP code

    if(function_exists('wp_paginate')) {
      wp_paginate();	
    }
    • This reply was modified 4 years, 2 months ago by AlanP57.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Override in Basel Theme’ is closed to new replies.