Title: Back button from category
Last modified: March 15, 2020

---

# Back button from category

 *  [sjlae50](https://wordpress.org/support/users/sjlae50/)
 * (@sjlae50)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/back-button-from-category/)
 * Dear all
 * Is there an option to add a back button on the different category sites? I found
   a code snippet to add a back button on a single advert but couldn’t find anything
   to add a back button on a category site.
 * Thank you very much for your help.
 * Best wishes,
    Silvan

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/back-button-from-category/#post-12547502)
 * Hi,
    out of box we do not have such functionality or code snippet, but to add
   a back button on all advert-category pages which will lead back to the page with
   all of the Ads you can paste the code below in your theme functions.php file 
   it should do it
 *     ```
       add_filter( "adverts_sh_list_before", function() {
         if( is_tax( 'advert_category' ) ) {
           $url = get_permalink( adverts_config( "ads_list_id" ) );
           echo sprintf( '<p><a href="%s">Go back to all ads &rarr;</a></p>', $url );
         }
       }, 1 );
       ```
   
 *  Thread Starter [sjlae50](https://wordpress.org/support/users/sjlae50/)
 * (@sjlae50)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/back-button-from-category/#post-12547518)
 * Hi Greg,
    Thank you very much for your fast help. The back button (link) works
   perfect. BUT, is it possible to place it after all adverts on the category page?
   As the name suggests currently the link is BEFORE all adverts. Thank you. Best
   wishes, Silvan
 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/back-button-from-category/#post-12551254)
 * Hi,
    without changing original source code i am afraid not, as right now we only
   have adverts_sh_list_before action in the list.php file which runs at the beginning
   of the file.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Back button from category’ is closed to new replies.

 * ![](https://ps.w.org/wpadverts/assets/icon-256x256.png?rev=2423472)
 * [WPAdverts - Classifieds Plugin](https://wordpress.org/plugins/wpadverts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpadverts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpadverts/)
 * [Active Topics](https://wordpress.org/support/plugin/wpadverts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpadverts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpadverts/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/back-button-from-category/#post-12551254)
 * Status: not resolved