Jump to content

how to omit 'home' category from the sitemap page (sitemap page arrived by footer link)


Recommended Posts

I have edited the root category of 'home' to be "not displayed" in backoffice, and the "root" category settings section lacks the 'rewrite URL' function. The root category 'home' still gets listed in the sitemap page, and now clicking on it yields the "no products found" info. I want to omit the 'home' category link from the sitemap page entirely. the 'home' page i want to omit arrives as thisshopsurl.com/2-home . Using ps1.7.8.0 . 

001545.png

001546.png

Link to comment
Share on other sites

  • 3 months later...

In /public_html/modules/gsitemap/gsitemap.php, getCategoryLink() method,

foreach ($categories_id as $category_id) {
            $category = new Category((int) $category_id['id_category'], (int) $lang['id_lang']);
			...

add

foreach ($categories_id as $category_id) {
            if ($category_id == 2) {
            	continue;
            }
            $category = new Category((int) $category_id['id_category'], (int) $lang['id_lang']);
			...

"2" being the category id

Link to comment
Share on other sites

  • 1 month later...
On 3/11/2022 at 1:51 PM, Ress said:

In /public_html/modules/gsitemap/gsitemap.php, getCategoryLink() method,

foreach ($categories_id as $category_id) {
            $category = new Category((int) $category_id['id_category'], (int) $lang['id_lang']);
			...

add

foreach ($categories_id as $category_id) {
            if ($category_id == 2) {
            	continue;
            }
            $category = new Category((int) $category_id['id_category'], (int) $lang['id_lang']);
			...

"2" being the category id

that did not seem to work, will give it further testing soon as i can. thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...