Title: Callback Field (plugin version 1.5.24)
Last modified: August 21, 2016

---

# Callback Field (plugin version 1.5.24)

 *  Resolved [keubs](https://wordpress.org/support/users/keubs/)
 * (@keubs)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/)
 * I noticed you added it for version 1.5.24. This is perfect for what I’m trying
   to accomplish, but I can’t get it to work. Does the field need <?php ?> tags?
   Are arguments able to be passed in using tokens? Basically all I’m trying to 
   do is print all of the tags associated with a post. Is this possible?
 * Thanks
 * [https://wordpress.org/plugins/query-wrangler/](https://wordpress.org/plugins/query-wrangler/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Jonathan Daggerhart](https://wordpress.org/support/users/daggerhart/)
 * (@daggerhart)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836605)
 * Hi keubs,
 * No, you don’t need to include any php in this field.
 * There are a few ways to make this work using the_tags function ([https://codex.wordpress.org/Function_Reference/the_tags](https://codex.wordpress.org/Function_Reference/the_tags))
 * Easy way:
    1. Add a callback field to your query, and set the callback to ‘the_tags’, do not
       check ‘include additional information’.
    2. Save the field, and preview the query. You should see the tags for the posts
       listed.
    3. Save the query.
 * If you want to customize the output a little more, here is a slightly harder 
   way:
    1. Add a callback field to your query, and set the callback to ‘my_custom_the_tags’,
       check ‘include additional information.
    2. Save the field.
    3. Open your theme’s function.php file (or, somewhere else you’d like to store 
       a custom function, could be a custom plugin) and add a new function that looks
       like this:
    4.     ```
           function my_custom_the_tags($this_post, $field, $tokens){
             // now you can add custom arguments to the_tags function here
             the_tags("before tags", "between tags", "after tags");
           }
           ```
       
    5. Go back to the query and preview it. You should see your custom results.
    6. Save the query.
 * This example field explains a little about the additional callback parameters
   that are included when you check the ‘Include Additional Information” setting
   for a callback field: [https://gist.github.com/daggerhart/10417309](https://gist.github.com/daggerhart/10417309)
 * Hope this helps. Let me know if it doesn’t make sense, or you run into other 
   issues.
 * Thanks,
    Jonathan
 *  Plugin Author [Jonathan Daggerhart](https://wordpress.org/support/users/daggerhart/)
 * (@daggerhart)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836650)
 * Just to clarify,
 * In the second example, you don’t have to check “Include Additional Information”
   since the example custom function doesn’t make use of the $this_post, $field,
   or $tokens parameters.
 * If you didn’t need those extra parameters, and didn’t “Include Additional Information”,
   then the callback function would look like this:
 *     ```
       function my_custom_the_tags(){
         the_tags("before tags", "between tags", "after tags");
       }
       ```
   
 *  Thread Starter [keubs](https://wordpress.org/support/users/keubs/)
 * (@keubs)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836680)
 * Hi Jonathan,
    So far I’ve tried adding the callback name “the_tags” to the field,
   to no avail. I’m pretty green on wordpress (originally a drupal dude) so I’m 
   learning about “the loop”. Seems like the_tags isn’t being called within the 
   context of this query, because when I debug that function, my breakpoint only
   hits once despite having 4 posts. I’ll keep researching, but I provided a screenshot
   to see if maybe I missed something small.
 * Thanks
 * ss:
    [https://www.evernote.com/shard/s287/sh/b0cfd198-9bf1-475a-b65b-c4a6b28a3d95/ef56b95aad9194e9a0de208efd064214](https://www.evernote.com/shard/s287/sh/b0cfd198-9bf1-475a-b65b-c4a6b28a3d95/ef56b95aad9194e9a0de208efd064214)
 *  Plugin Author [Jonathan Daggerhart](https://wordpress.org/support/users/daggerhart/)
 * (@daggerhart)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836688)
 * I see your issue, you need to change the “Row Style” to “fields”. The “Post” 
   row style is equivalent to Views “Node” row style. If the row style is “Posts”,
   then the fields aren’t ever rendered.
 * Let me know how that works out for you.
 *  Thread Starter [keubs](https://wordpress.org/support/users/keubs/)
 * (@keubs)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836690)
 * Ha that worked! Of course it turns out to be some rookie mistake. Thanks a ton
   man. I wouldn’t have gotten that far if it weren’t for your first post, and I’ll
   be using the custom function stuff later on in the project, so your efforts to
   explain weren’t completely in vain.
 *  Plugin Author [Jonathan Daggerhart](https://wordpress.org/support/users/daggerhart/)
 * (@daggerhart)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836720)
 * No worries at all. Let me know if you run into other issues.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Callback Field (plugin version 1.5.24)’ is closed to new replies.

 * ![](https://ps.w.org/query-wrangler/assets/icon-256x256.jpg?rev=3279076)
 * [Query Wrangler](https://wordpress.org/plugins/query-wrangler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-wrangler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-wrangler/)
 * [Active Topics](https://wordpress.org/support/plugin/query-wrangler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-wrangler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-wrangler/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Jonathan Daggerhart](https://wordpress.org/support/users/daggerhart/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/callback-field-plugin-version-1524/#post-4836720)
 * Status: resolved