• I’ve been looking around to no avail. Anyone know a good way to do a pagination such as this?

    https://enrique-ramirez.com/tmp/screen_shot_2010-08-26_at_4.42.32_pm_2abf.png

    The current code I’m using:

    <?php next_posts_link('<img src="/wp-content/themes/seventhman/images/icons/btn-prev.gif" alt"Previous" />') ?>
    Page <strong>1</strong> of <strong>12</strong>
    <?php previous_posts_link('<img src="/wp-content/themes/seventhman/images/icons/btn-next.gif" alt"PNext" />') ?>

    I need a way to retrieve the page the user currently is, the number of total paginated pages there are and a way to stop this sentence from appearing if there are no pages at all.

    Catch is: can’t use a plugin. So if anyone could point me in the right direction for a functions.php function or something, it’d be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • what is the reason that you can’t use a plugin? you can all ways copy the code on the plugin and adde it to your function.php file

    Thread Starter enrique-ramirez

    (@enrique-ramirez)

    My main reason is I’m concerned about compatibility. This theme will be installed in some older WP versions, so a generic function could be more suitable.

    Also, asking people to install a plugin can be quite complex for the computer illiterate. I want this as “plug and play” as possible (even though Plugins are already quite simple to install).

    Last resort would be a plugin, but would be way better without one.

    what wordpress version are you running?

    wp-pagenavi is very stable https://www.ads-software.com/extend/plugins/wp-pagenavi/
    you can check the plugin author if it is compatible with the version that your running

    after installing the plugin you can change/add styles to fit your needs. also you should always have a development site to test plugins before you install them.

    If you want to accomplish the navigation with just a function and if you can find anybody that wants to write it for you they need to know what version you are running to make the function compatible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"Page # of #"-like Pagination.’ is closed to new replies.