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

    (@stepasyuk)

    Hello @laurent4671

    Thank you for using Filter Everything plugin.

    You can achieve that via hook wpc_filter_term_url available in the plugin. It allows you to modify any filter URL and add desired anchor to its end.

    Of course this expects that you are familiar with WordPress hooks and can use them.

    Thread Starter LuciferX

    (@laurent4671)

    Thanks for your reply, I’ll take a closer look at this.

    Thread Starter LuciferX

    (@laurent4671)

    For those who would like to do the same thing, here is how I did it.

    /* 1 – Add an ID named “filter” after the “term-description” div generated by WooCommerce on product categories */
    add_action( ‘woocommerce_archive_description’, ‘add_filter_div_after_term_description’ );
    function add_filter_div_after_term_description(){
    echo ”;
    }

    /* 2 – Add “#filter” at the end of the product sorting URL (brands and colors) on categories */
    function add_filter_anchor_to_url( $url ) {
    return $url. “#filter”;
    }
    add_filter(‘wpc_filter_term_url’, ‘add_filter_anchor_to_url’);

    • This reply was modified 2 years, 1 month ago by LuciferX.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add an anchor to the results ?’ is closed to new replies.