WordPress.org

Ready to get started?Download WordPress

Forums

add_filter in wordpress oop plugin (2 posts)

  1. girll
    Member
    Posted 11 months ago #

    HI all. I am writing a wordpress plugin with OOP techniques. I need to add filter.I write it so:

    add_filter('the_content', array($myObject, 'display_products'));

    But in that case it starts to load page without end.
    How should I write it right?
    Thanks!

  2. bcworkz
    Member
    Posted 11 months ago #

    Depending on the context from which you add the filter, what you have may be correct. Perhaps there is a flaw in your display_products() method?

Reply

You must log in to post.

About this Topic