Wordpress: can you identify page name in variable?
Posted: Mon Feb 20, 2017 11:13 am
We have a WP website where there is a background image set via the theme. But we want to disable it for the homepage.
I don't see a theme means of doing that, so thought I might use the "insert php" plugin.
Trouble is, I can only see the best way to achieve this is to query what page I Am on, and if on "homepage", then to echo a bit of CSS to set the background image to be none.
But how do I identify the "homepage" in a Wordpress site? I don't know what variable's it uses to query the $page.
Any ideas?
I don't see a theme means of doing that, so thought I might use the "insert php" plugin.
Trouble is, I can only see the best way to achieve this is to query what page I Am on, and if on "homepage", then to echo a bit of CSS to set the background image to be none.
But how do I identify the "homepage" in a Wordpress site? I don't know what variable's it uses to query the $page.
Any ideas?