• Hi Greg Winiarski,

    On the Categories page [adverts_categories] I clicked into 1 category (For example electronics). Then, at the “electronics” category page. But there’s no way to get back to the Categories [adverts_categories] page because Breadcrum only shows like: Home >> Electronics
    Not: Home >> Adverts categories >> Electronics. It seems that the Adverts categories and the electronic sites are not the same type, so they cannot appear on Breadcrumb.

    If I can’t get back to the general advert page (adverts_categories) using Breadcrumb to access another category, is there a way to do this? For example, a back button.
    Please give me advice.

    Screenshot: https://imgur.com/N9V5wQP

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    the page with [adverts_categories] shortcode is a Page while the category pages are Taxonomy pages so you are correct that they are not using the same type.

    What you can do is show a “Go back” button above the search bar on the category pages, to do that add the code below in your theme functions.php file

    
    add_filter( "adverts_sh_list_before", function() {
      if( is_tax( 'advert_category' ) ) {
        $url = get_permalink( 1000 );
        echo sprintf( '<p><a href="%s">Go back to all ads &rarr;</a></p>', $url );
      }
    }, 1 );
    

    In the code just replace “1000” with an actual ID of the page with [adverts_categories] shortcode.

Viewing 1 replies (of 1 total)

The topic ‘Turn back adverts categories page’ is closed to new replies.