• harry murtie

    (@masterseoonline)


    thanks your great plugin,
    I want to call custom filed, and display it on related post loop in addition.
    is it possible to use a hook filter?
    can you give me an example code?
    because your plugin is very complex with cache, I worry about conflict.
    my custom field is “wpcf_product”

Viewing 1 replies (of 1 total)
  • Plugin Author Ajay

    (@ajay)

    This shouldn’t conflict with the cache, however, if you have the CRP cache on, you should clear that from the settings page.

    You can use this example – https://gist.github.com/ajaydsouza/968b24a052e858bf8926 – which first fetches the posts and then passes it to WP_Query. You can then use any markup you want to display the custom field or anything else.

    Another alternative is to filter crp_after_list_item with the code to pull out your custom field (not sure what code is used there). You can use $result which is the post object for the current post to fetch out the custom field.

Viewing 1 replies (of 1 total)
  • The topic ‘display custom filed on related post loop’ is closed to new replies.