• Resolved rfkat

    (@rfkat)


    Hi,

    Thank you for this wonderful plugin, I love the freedom the template mechanism gives me.

    Currently, it does not seem possible to style the pagination with CSS in detail, because the li around the current page is not selectable (using CSS3, that is). Can you enrich the output of display_pagination_controls() a bit, in the next version, so I can make a selector match?

    Greetings,
    Rolf

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Eric Teubert

    (@eteubert)

    Hi,

    I’m not working on this plugin any more. But maybe you can still find a solution by using CSS Child combinators, maybe that way you can be specific enough? I can’t recall how the generated HTML looks exactly though, so it’s just a wild guess ??

    Thread Starter rfkat

    (@rfkat)

    Thanks for the quick reply, @eteubert – I needed to style the li elements, so selecting the “current page” li is sadly not possible.

    However, since you’re no longer maintaining this, I’ve now just modified display_pagination_controls() according to my needs, replacing the lists with simple links and spans. In case somebody else stumbles across this issue, hre’s the modification:

    <div class="archivist-pagination pagination nav-links">
    <?php for ($i = 1; $i <= $total_pages; $i++): ?>
                    <?php if ($current_page === $i): ?>
                            <span
                                    class="page-numbers current" aria-current="page"
                                    data-page="<?php echo esc_attr($i); ?>">
                                    <?php echo $i; ?>
                            </span>
                    <?php else: ?>
                            <a
                                    href="<?php echo esc_attr(add_query_arg('archivist_page', $i, $current_url)); ?>"
                                    class="archivist-pagination-link page-numbers"
                                    data-page="<?php echo esc_attr($i); ?>">
                                    <?php echo $i; ?>
                            </a>
                    <?php endif ?>
    <?php endfor ?>
    </div>
    • This reply was modified 3 years, 6 months ago by rfkat.
    • This reply was modified 3 years, 6 months ago by rfkat.
    Plugin Author Eric Teubert

    (@eteubert)

    Indeed, very little chance that I will release another version that may override your edits.

    Thanks for leaving a solution for others!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Styling the pagination?’ is closed to new replies.