I am making a website on Wordpress, I have to make fifty pages for each American state (e.g domain.com/Alabama), I want to type type a variable that changes into "Alabama" and so so on for each state, so I want to print the page title against a variable. (e.g if I type <h2>Services in {page_title}</h2>
on this page "domain.com/Alabama" it should give me "Services in Alabama")
I am trying this get_the_title( int|WP_Post $post )
I am getting blank space...
If you are in the loop you can use:
the_title();