• I am a plugin developer and i want to run my filter over the wpforo post content

    Doing this:
    add_filter( 'the_content', 'my_filter_function' ); does not work.

    Is there a specific filter hook in place of ‘the_content’ for the wpforo post content i should use?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author gVectors Team

    (@gvectors-team)

    Hi Jacob,
    wpForo post is not a WordPress post type. wpForo is not based on wp_posts table, it makes all lighter and doesn’t overload your WordPress. wpForo uses own tables for posts.

    You should use this code to filter wpForo post content:
    add_filter( 'wpforo_content_after', 'my_filter_function');

    In case you want to get some extra data about the current filtered post you should use the second argument:

    add_filter( 'wpforo_content_after', 'my_filter_function', 10, 2);
    

    Two arguments$content and $post (wpForo post data array, this is an associative array with keys identical to wp_wpforo_posts table fields);

    Important! Make sure you use the latest version. This hook has been added since 1.4.7.

    • This reply was modified 6 years, 11 months ago by gVectors Team.
    Thread Starter Jacob N. Breetvelt

    (@opajaap)

    Thanx for the very fast response. I will give it a try.

    Work very well !!

    Thanks both jacob and gvectors.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Content filter hook’ is closed to new replies.