Please help on adding pagination at top and bottom of the product page in magento 2 .

| improve this question | | | | |
  • Hi. You want to add pagination on PDP or PLP? – Raj Dec 20 '18 at 6:56
  • PLP where magento default pagination at bottom of page i want at top too. – Muhammad Hamza Dec 20 '18 at 7:01
  • @MuhammadHamza please find below share answer magento.stackexchange.com/a/255304/52244 if it's match your solution please mark it's as valid answer and please do up vote so if others looking same kind of answer they can get quick response. – Kanhaiya lal Dec 20 '18 at 7:49

put css in less file:


.toolbar-products .pages {
    display:block !important;
| improve this answer | | | | |
  • 1
    It good to get quick solution but that to be more valid, for general info : Getting used to the !important declaration in CSS is very easy, but it is also a bad habit for a web developer since it leads to missing or ignoring the real underlying issues in the HTML structure and the corresponding CSS styles that should better be fixed in other ways. The !important rule also makes it hard for the user to apply their own styles for better readability or accessibility while viewing your website. hope you take it as suggestion. – Kanhaiya lal Dec 20 '18 at 8:39

Goto your Theme folder and open this below given file

if not exist please copy from your Parent Theme or from Magento_Catalog module.

if you using LUMA copy for your theme then this file will exist.


In this file under @media-common at last add give css

& when (@media-common = true) {

    .toolbar-products {
        .pages {
            display: inline-block;

and clear pub/static/frontend/* folder and var/view_preprocessed/pub/static/frontend/*

and deploy you will get output like below share screenshot.

enter image description here

| improve this answer | | | | |
  • Hi @kanhaiyal Thanks i cant find directory module_toolbar.less can you help me to find that... – Muhammad Hamza Dec 20 '18 at 7:55
  • @MuhammadHamza please check updated answer it was editor mistake / was missed – Kanhaiya lal Dec 20 '18 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.