add Boolean / setting / meta data to PAGE via add / edit section of admin for use in theme

I would like to add an attribute / Boolean variable / meta data to a page when editing / adding via admin (right hand sidebar), that is then accessible by my theme for sidebar creation and navigation management etc. eg if( ! $page->has_content ) go to child;

I would like to build this into the theme if possible but can build in a plugin if necessary.

NB: I have tried googling but I mostly get muddled results by google thinking I need more basic WordPress help! or find information on adding attributes to posts not pages!!

Also I have installed add category to page plugin but it doesn’t do what I need! Although it does add a box in the right hand sidebar of page edit area..

I am happy to hear other suggestions or simply be pointed into the right direction as this is my first WordPress experience.

Detailed description;

I’m having to convert my clients website (I built with my own php framework) into a WordPress site for them to manage. I need to keep the admin area simple so need to use the pages section with parent of structure.

The attribute / flag / variable is to tell the theme that this page is a dummy category and should redirect / place link to the first grand child page;

The structure of the content page template used for all pages (except home and contact page) is the same.
All top level page sections will have child pages of which some will have content and others may have grand-child pages. if a grandchild page exists usually the child page will not have content and will direct straight to the first grand-child, although it may have content. I have built this into my framework of the current site & believe i can handle the redirection / link placing, but will ask a separate question if need be.

example using about tab from menu:

– Chairman Message <- has content, no children
– Our Teams <- Goes to Team 1, no content
– Team 1
– Team 2
– Our Offices <- has content
– Office 1 <- has content

So if I clicked on Our Teams the url would be loading team 1 page. If I navigated to it would redirect to etc

I simply need a checkbox in the add/edit page section side menu to mark a page as dummy / heading only that I can reference in my theme! A simple action yet have found no documentation regarding this in 3 days!

any help appreciated.

Read more here:: add Boolean / setting / meta data to PAGE via add / edit section of admin for use in theme

Leave a Reply

Your email address will not be published. Required fields are marked *