DEV Community

Amit Jotwani
Amit Jotwani

Posted on • Originally published at ajot.me on

Changing the Number of Posts Displayed Per Page in Ghost CMS

Changing the Number of Posts Displayed Per Page in Ghost CMS

So, I wanted to customize the number of posts displayed per page on my Ghost CMS website using the Dawn theme. The default setting was showing only 5 posts, and I wanted to bump that up to 25.

Here's how I did it, broken down into simple steps, so it's easy to remember and follow along.

Download the theme you are currently using

First, we need to download the current theme to access the file containing the posts' settings.

Go to **Settings -> Design** in your Ghost CMS admin panel.

Changing the Number of Posts Displayed Per Page in Ghost CMS

Edit package.json File

  1. Open the downloaded theme directory and locate the package.json file.

  2. Find the key posts_per_page and change its value to your desired number (For Dawn theme, by default, this was set to 5. I changed mine to 25).

  3. Save the changes to the file.

Changing the Number of Posts Displayed Per Page in Ghost CMS

Zip Up the Directory

We need to prepare the modified theme for uploading back to Ghost CMS.

Zip up the entire theme directory, ensuring all necessary files are included (on a Mac, you can right click on the directory, and click "Compress").

Upload the Modified Theme to Ghost CMS

Finally, we need to upload the customized theme back to Ghost CMS.

  1. Head back to the **Design** section in your Ghost CMS admin panel.
  2. Upload the zipped directory containing the modified theme.

Changing the Number of Posts Displayed Per Page in Ghost CMS

Fin!

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay