Rank Math SEO plug-in that we're using has an option to enter Post ID for the pages that need to be excluded from the sitemap.xml. But it doesn't seem to be working. Is there a standard way to do it?
In my WordPress website. I am disallowing /wp-includes/js/* folder in the robots file. Is that bad? I use SEMRush to audit my site and it shows an error that a resource at the above location is being blocked. This is my robots.txt User-agent: * Allow: /wp-content/uploads/ Disallow: /wp-admin/ Disallow: /wp-includes/ Disallow: /wp-content/plugins/ Disallow: /linkout/ Disallow: /recommended/ Disallow: /comments/feed/ Disallow: /trackback/ Disallow: /index.php Disallow: /xmlrpc.php Disallow: /readme.html Disallow: /refer/ Disallow: /search/ Allow: /wp-admin/admin-ajax.php Sitemap: https://www.example.com/post-sitemap.xml Sitemap: https://www.example.com/page-sitemap.xml Sitemap: https://www.example.com/video_portal-sitemap.xml Sitemap: https://www.example.com/press_release-sitemap.xml …
website is using default WP sitemap packages /** * Sitemaps: WP_Sitemaps class * * This is the main class integrating all other classes. * * @package WordPress * @subpackage Sitemaps * @since 5.5.0 */ and everything works fine for main sitemap that renders sub sitemap url and it also works for subtype-1.xml but for other numbers same thing goes for othersubtype-1.xml etc. I could not find any settings for clear the cache if it is related to. I added a …
I'm trying to render my page structure as an ordered list (<ol>) showing the hierarchy using nested ordered lists. So it should look something like <ol> <li> About <ol> <li> Leadership <ol> <li>CEO</li> <li>COO</li> </ol> </li> </ol> </li> <li>Services</li> <li>Products</li> </ol> or About Leadership CEO COO Services Products I created a function to get 1 level of pages which I call recursively for any pages with child pages. function aiv_get_sibling_pages($cur_page = null) { $front_page_id = get_option('page_on_front'); $next_page = $cur_page ? …
I've seen that many sites have a dedicated page for a sitemap, not just an .xml file. For example, https://www.casinos.de/sitemap/ They're using Yoast SEO and sitemap.xml is also available, but how can you embed the whole sitemap in a page like this? Is there a function or just a file_get_contents()?
I have a series of "Thank You" pages which result from different form submissions. I would like to be able to exclude these from sitemaps based on their template. Specifically, and as an easy example, excluding them from being listed on the basic 404 page which utilizes the wp_list_pages. I know how to manually exclude by ID but am looking for a better way to do this on scale and a more simplified approach--rather than having to edit code. Is …
I am searching for a way to "detect" in which sitemap a post is located in but I cannot find any solution to this problem, nor does any SEO plugin or Cache plugin provide any way or wrapper function to return this? Essentially I'm looking for a function that takes a $post_id or a $post object and can return a sitemap URL in which that post is located or an array of sitemaps (if it shows up in multiple sitemaps). …
I have a multisite Wordpress site. The structure of its URLs is currently the following: mysite.com mysite.com/subfolder/ Now, I know that I can put the sitemap of the first site (mysite.com) in the Wordpress root folder. In fact, I did and it works. But where do I insert the sitemap of the second site (mysite.com/subfolder/)? Thank you very much everyone in advance for any response, because it is important to me.
I'm trying to omit specific CPTs from the WordPress generated wp-sitemap.xml based on a meta key value. I only found one post online regarding this on perishable press, however it throws up a fatal error in PHP whether or not I modify it. If anyone knows how to do this for meta key values or multiple meta key values using relation, I would appreciate some info. Last piece I need to finalize my sitemaps. Original code from Perishable Press (throws …
My WordPress site also incorporates some external non-WP content that is dynamically pulled into the page via shortcode. The content shown depends on a query string parameter. So from WP's point of view, index is just a single page containing a shortcode; but in reality, when you visit index?x=1, index?x=2, index?x=3, etc. you get different page content depending on the x value. (It's a primary key ID into a large external database.) This works fine, and avoids creating thousands of …
I want to query the categories and tags that have a description to make sure only those are listed in the sitemap. The description__like argument used by get_terms() is the closest I've gotten to it. // Clean sitemap // https://wordpress.org/support/topic/remove-the-archive-pages-from-the-sitemap/ add_filter( 'wp_sitemaps_taxonomies_query_args', function( $args, $taxonomy ) { // Show in sitemap categories and topics that have a description if ( $taxonomy == 'category' || $taxonomy == 'post_tag' ) { # First attempt $args['description__like'] = ''; # Desperate second attempt $args['meta_query'][] …
I need help about how to create a custom sitemap for my backlinks, so I can submit it to google search console for faster indexing of my backlinks. Example: Creating a sitemap that consists of my website social profile links. Sitemap Index Urls: https://twitter.com/mywebsite-com https://facebook.com/mywebsite-com https://instagram/mywebsite-com
I have a website that uses both categories and tags to organise posts. I have removed the /tag/ in the URL so that it reads: example.com/tag-1-details/ However in my sitemap (Yoast) it says: example.com/tag/tag-1-details/ Can anyone help and advise how I can remove the ‘tag’ from the urls in Yoast Sitemap. Thanks -- Another option would be to use another plugin, advice appreciated.
I was about to submit my wordpress auto-generated sitemap to Google Search Console but I realized my sitemap contains weird links and it doesnt contain any of my actual pages. I checked example.com/sitemap.xml and example.com/wp-sitemap.xml and example.com/sitemap_index.xml. They all contain different weird links like : <url> <loc>https://example.com/armrests71n79/jsxc93911899.htm</loc> </url> <url> <loc>https://example.com/ferocebotc/iq39894629.htm</loc> </url> <url> <loc>https://example.com/hairspraysp6/ekqpmh46441760.htm</loc> </url> And this is just 3 of them. There are almost 1000 links like this and my site actualy has just 27 pages. Extra information: I recieved …
I am using Yoast' method to build an HTML site map. But it needs to be translated. It uses a page template page-sitemap.php that uses a template part <?php get_template_part('/partials/sitemap'); ?> In this template part I... load_textdomain( 'site-map', TEMPLATEPATH.'/partials/languages' ); The path is right for I list the files of the folder TEMPLATEPATH.'/partials/languages' and it shows my language files. As you see my domain name is 'site-map'. My .mo file is site-map-fr_FR.mo. Why can't it be loaded? Thanks for any …
Instead of no indexing a page I just want to exclude it from the auto created wp-sitemap.xml (some code in the functions.php file) I found this but it did not seem to work? https://perishablepress.com/customize-wordpress-sitemaps/#exclude-pages Anyone shed some light.... Please no Yoast info!!!
Consider the two following custom post types: Museums Bakeries With one shared taxonomy: Region I'm using rewrite rules to improve the URL structure, so I can serve pages to visitors such as: https://myurl.com/museums/london (all museums in London) https://myurl.com/bakeries/birmingham (all bakeries in Birmingham) https://myurl.com/bakeries/london/aok_kitchen (a specific bakery in London) Here are the rewrite rules: function my_url_rewrite_rule() { add_rewrite_rule( '^museums/([^/]+)/?$', 'index.php?taxonomy=region&post_type=museums&term=$matches[1]', 'top' ); add_rewrite_rule( '^museums/([^/]+)/page/([0-9]+)?$', 'index.php?post_type=museums&genre=$matches[1]&paged=$matches[2]', 'top' ); add_rewrite_rule( '^bakeries/([^/]+)/?$', 'index.php?taxonomy=region&post_type=bakeries&term=$matches[1]', 'top' ); add_rewrite_rule( '^bakeries/([^/]+)/page/([0-9]+)?$', 'index.php?post_type=bakeries&genre=$matches[1]&paged=$matches[2]', 'top' ); } add_action( 'init', 'my_url_rewrite_rule', …
I don’t know since when it started but today, I looked at it and it shows more than 90k pages are indexed on google in search console when my site has only 90 posts and some pages. https://priceunder.in/sitemap.xml