I have a custom page template to use for a wordpress page. I am trying to setup a custom rewrite rule but without success.
I have a page at blog/book-page/, the display of this page depends on the book id, hence I want url like blog/book-page/book-id/ to read the book id.
In my functions php I have included the below function from Wordpress Codex:
I refreshed the rewrite rules by saving the permalinks in the dashboard.
Unable to solve by looking at similar questions at: Custom rewrite rule is not picked by Wordpress and https://wordpress.stackexchange.com/questions/91673/need-help-creating-custom-rewrite-rule
Any suggestions, Thanks in advance.