After fresh WordPress installation, I decided to stick with the Twenty Seventeen WordPress theme. I was very impressed by its design. As, I am running a blog website, and Twenty Seventeen WordPress theme has a small limitation. By default it allows only 3 blog posts to be featured on the front page. So I had to hack a bit to allow to display 10 blog posts.
At the beginning, I started to run grep command on the whole site looking for the “3” characters. I got hundreds, even thousands of results. I needed a way to narrow it down.
A solution was, to change directory to the theme directory and continue looking inside. So, I went to wp-content/themes/twentyseventeen directory.
grep "3" * -r
This time I got fewer results, but still too much to check one by one. I got results from the unrelated files. For example from *.svg and *.css files. I expect to find “3” inside the PHP files. So, I decided to narrow it down even more. My final grep command was:
grep "3" --include='*.php' -r
Now I got just a few results, and one of them was the one, that I expected to get. Take a look:
So, finally, I have just to edit the wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php to change number of pages displayed on the fron page. I changed it to 10 as bellow:
About the author
Yuli is experienced software security architect, is a co-founder of Kesem.IO, working as a company CTO.
KESEM.IO is creating a trusted, fast, secure and easy to use solution to guarantee mobile payments on blockchain enabled digital assets.
Before Kesem.IO, Yuli was a founder of a database security company GreenSQL/Hexatier which was acquired by Huawei.
Some my code is available at: