Getting Page Attribute Select Value
Permalink
I have created a custom page attribute called 'background_theme'.
This will be used where users can change the properties of the page attribute to select from a drop down one of theme options.
What I am trying to do is in the header.php is look at the page's attribute and bring in an extra style sheet if it is selected.
As this attribute is a select attribute I can get object properties that include the ID, Value etc, but I cannot seem to work out how to access the value.
I am probably missing something really simple.
This will be used where users can change the properties of the page attribute to select from a drop down one of theme options.
What I am trying to do is in the header.php is look at the page's attribute and bring in an extra style sheet if it is selected.
As this attribute is a select attribute I can get object properties that include the ID, Value etc, but I cannot seem to work out how to access the value.
I am probably missing something really simple.
I kind of feel like there is something not working with select / checkbox attributes, but I think it would be something like: