How can my page select posts or widgets using a custom field?
-
In my template, I have a little general information box not pertaining to the main content. These boxes can have varied content and can appear on one or more pages.
What I would like, is the ability from the page edit options, to select these different boxes. So, if I’m on my ‘Washington State pages’, I would love to be able to select from a dropdown ‘Washington’ from my the other states.
I could create these little boxes as posts, but I don’t know how to create a dropdown selection for posts on each page (can a custom field do that)? So I go to say my washington state car rental page and washington state airline ticket page…how do I then select my little ‘washington state box’ as an related post?
I could create a widget, but again I don’t know how to select these from a page in a slick fashion?
I could also possibly use sidebars, but this isn’t exactly logical as what I want is a specific widget, and a sidebar is properly a container of one or more widgets.
However this is implemented, I would then need to find this value and display it in the template. So basically I would display outside of the main content and sidebar, my custom little box. I think as long as I can get the id for the post/widget in the template as a custom field, I can figure this out from there…it’s just getting a dynamic selector to work on the pages themselves.
Any ideas? Usually I can google this type of thing no problem, but I’m having the worst luck with this.
- The topic ‘How can my page select posts or widgets using a custom field?’ is closed to new replies.