79424145

Date: 2025-02-09 00:47:45
Score: 0.5
Natty:
Report link

Looking at the documentation of paginate_links, it just doesn't add disabled links so we can do that instead.

$links = paginate_links($args);
if (strpos($links, 'prev page-numbers') === false) {
    $links = '<button class="page-numbers prev" disabled>&lt;</button>' . $links;
} else if (strpos($links, 'next page-numbers') === false) {
    $links .= '<button class="page-numbers next" disabled>&gt;</button>';
}
echo $links;

Shows disabled link

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
Posted by: Umar Sid