WordPress.org

Support

Support » How-To and Troubleshooting » add_filter problem

add_filter problem

  • getincss
    Member

    @getincss

    Hi, everyone. I’m writing plugin and have a trouble with using add_filter. I need to add some text before the loop on pages like archive.php, search.php, etc. except single.php. What filter i need to use?
    Tnx.

Viewing 2 replies - 1 through 2 (of 2 total)
  • getincss
    Member

    @getincss

    hey, can anybody help me? 🙁

    scribu
    Member

    @scribu

    Well, there is no filter or action ‘before_the_loop’ or equivalent.

    The easiest and safest way is to insert <?php your_function(); ?> inside header.php, for example, which is before The Loop begins.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add_filter problem’ is closed to new replies.