WordPress.org

Ready to get started?Download WordPress

Forums

add_filter problem (3 posts)

  1. getincss
    Member
    Posted 5 years ago #

    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.

  2. getincss
    Member
    Posted 5 years ago #

    hey, can anybody help me? :(

  3. scribu
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic