I want to join another table with get_posts()
method and fetch fields from new table.
I know about add_filter( 'posts_where','calback_function_name')
.
Please help me
I want to join another table with get_posts()
method and fetch fields from new table.
I know about add_filter( 'posts_where','calback_function_name')
.
Please help me
You must be logged in to post a comment.
You will need to use your own query if you are going to start joining tables.
This is quite simple to do, and you can use WordPress’s methods to use it’s database handler.
There is lots of information on this in the WPDB WordPress Codex entry.
There are no build in function/method to do so. you have to write custom sql query to accomplish this task