What you want is a custom template that is used for all of the lyric pages. The page content is generated dynamically based on requested parameters in the URL. You really only add one page based on the template. Its code will deliver unique content based on the information that was requested. Lets say you request example.info/lyrics/led-zeppelin/stairway-to-heaven/. The page that is served is “lyrics”, the band and song are parameters the template code uses to fetch the appropriate data from the database and serve it to the browser.
You only have the one “lyrics” page, but it can dynamically generate nearly infinite possible sets of lyrics, limited only by your DB capacity.
@bcworkz Thank you for the response.
I do get the methodology to achieve it. However, while going through my WordPress Admin interface, I am unable to understand which specific functionality to use to get this going.
Can you please help in that?
The admin interface is only going to help you after you’ve done the necessary coding work. If you are using a distributed theme that is subject to occasional updates, like those from the plugin repository on this site, it’s strongly recommended that you create a child theme to contain your custom template. Otherwise updates will wipe out your custom work.
Your template could begin with a copy of your theme’s page.php if it has one, otherwise index.php might work. The main reason to start with a copy is so the theme’s styling is applied to your custom content. If that’s undesirable, you could start anew with an empty .php file if you wanted to. Name the file in accordance with template hierarchy.
Your code to fetch a song’s lyrics and display them needs to get the desired song from the super global $_GET, which means a request URL needs to be in the form example.info/lyrics/?song=stairway-to-heaven&artist=led-zeppelin. I recommend starting with that format to start with, but eventually you will likely want the more SEO friendly URL which I used as an example in my last reply. To get WP to recognize such an URL structure but still have your code be able to get parameters from $_GET, you need a custom rewrite rule to transform the SEO friendly URL to one that works for $_GET. To add such a rule, use add_rewrite_rule().