Support » Fixing WordPress » show page x of y for specific category

  • Howdy!

    At the bottom of each post that is in the category ‘painting’ I want to show ‘Page X of Y’.
    Currently I have 2 posts in this category, so the first post would show Page 1 of 2.
    Showing Y is easy, but I’m not sure how to show X.


Viewing 5 replies - 1 through 5 (of 5 total)
  • you need to edit your theme files for this

    I know that the theme files will need to be edited, I want to find out what code is necessary for what I want 🙂



    Forum Moderator

    Sorry but all of our psychic browsers are offline at the moment. So rather than accessing your theme by the powers of divination, we need you to post a url to your site so we can see this theme in action. We are sorry for this inconvenience but we will try to restore Psychic Support as soon as possible 😉

    Moderator keesiemeijer



    Is this on a category template?

    Showing Y is easy …

    How do you show Y?

    Esmi – the page that I’m trying to do this on is as you can see my current attempt shows ‘Page 4 of 2’ – the first number includes all the published posts which I don’t want.

    keesiemeijer – I have shown Y with the following:

    	$postsInCat = get_term_by('name','painting','category');
    	$postsInCat = $postsInCat->count;
    	echo $postsInCat;
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘show page x of y for specific category’ is closed to new replies.