how to add custom fields in page

Edit: Came back on this post much later but I am updating this with more correct information. The following code will allow you to display the value of a custom field anywhere in your theme or plugin, as long as you are getting the correct post ID to pass to it. You would need to … Read more

How to insert content from another Custom Post type into Post?

Currently the best way I know to handle that is the Posts 2 Posts plugin: http://wordpress.org/extend/plugins/posts-to-posts/ Here’s an example showing how to set up the custom post types (if you already have them it’s more for other’s benefit who might be reading this) as well as the function call to p2p_register_connection_type() needed by the plugin … Read more

how can i use custom field in query post

Your meta_query needs to be a nested array, like so; $args = array( ‘posts_per_page’ => ‘5’, ‘cat’ => ‘3’, ‘orderby’ => ‘rand’, ‘meta_query’ => array( array( ‘key’ => ‘Featured List’, ‘value’ => ‘Yes’ ) ) ); And I get the feeling you don’t actually need a LIKE match – this’ll perform a loose comparison, and … Read more

Dynamically add / duplicate custom meta in custom post types

I will answer myself after some research 🙂 while there might be appropriate ways of coding this with some custom function, for me there’s no need to reinvent the wheel when there’s a neat plugin that does the job it’s called “advanced custom fields” http://wordpress.org/extend/plugins/advanced-custom-fields/ it has a “repeater” to let admins add more fields … Read more