1

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

  • 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
1

put css in less file:

app/design/frontend/Vendor_Name/Theme_Name/Magento_Catalog/web/css/source/_module.less

.toolbar-products .pages {
    display:block !important;
}
  • 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
2

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.

app\design\frontend\VENDOR\THEME\Magento_Catalog\web\css\source\module\_toolbar.less

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

  • 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.