I haven't seen this done, but I want to return the custom field values outside of the loop in the sidebar.
Is there a plugin, or another way to achieve this?
thanks!
|
I haven't seen this done, but I want to return the custom field values outside of the loop in the sidebar. Is there a plugin, or another way to achieve this? thanks! |
|||
|
|
|
Definitely doable with tons of different ways to accomplish it. Basically, you can use a widget that allows for the execution of PHP or modify your theme files to execute PHP in the sidebar. The main function you will need is
Obviously, you need to change the "my_post_meta_key" value to a key that corresponds to the meta data that you want. Also, there are other ways to access the current page/post/CPT ID, but since I do not know your specific context, this will work for most situations. |
|||||
|