html sitemap via recursive function

The “memory exhausted” error in question happened because of this part in your function: ‘parent’ => $next_page -> post_parent, which should actually be ‘parent’ => $next_page -> ID (or I’d omit the unnecessary spaces, i.e. I’d use ‘parent’ => $next_page->ID). And the error can be illustrated like so: $cur_page = get_post( 123 ); // assume … Read more

Exclude a specific page from WordPress sitemap. (wp-sitemap.xml)

The code below does work, just make sure you are editing the correct themes function.php file! // Remove specific pages function gt_disable_sitemap_specific_page($args, $post_type) { if (‘page’ !== $post_type) return $args; $args[‘post__not_in’] = isset($args[‘post__not_in’]) ? $args[‘post__not_in’] : array(); $args[‘post__not_in’][] = 221; //locations $args[‘post__not_in’][] = 261; //blog return $args; } add_filter(‘wp_sitemaps_posts_query_args’, ‘gt_disable_sitemap_specific_page’, 10, 2);

Where is All in One SEO Pack sitemap.xml located?

The sitemap added by most of the plugins (such as Google sitemaps or YOAST SEO pack) is a virtual file added to your websites by the plugin. This file doesn’t physically exist, therefore modifying it is not an option for you. There might be 2 things that you can do about it, Either find the … Read more

Where do upload sitemap.xml in WordPress?

The root of your site is where the wp-admin, wp-content and wp-includes folder is. From what you are showing in the image this does not appear to be the actual root directory of your WordPress installation. You could make this easier with the plugin mentioned by the other answer but if you are looking for … Read more

“No sitemap linked in your robots.txt file”

Well, that message is pretty self explanatory. There is no sitemap linked in your robots.txt file. So you check if you have a sitemap (if not install a plugin that will generate one for you) and add this line to your robots.txt file in the root of your site: Sitemap: http://www.example.com/sitemap.xml

Uploading sitemap.xml

WordPress is set up in a way that mostly ignores existing files. If what you want is literally upload fixed sitemap.xml file you can just do that and upload it to the root of your site (using FTP, hosting control panel, or whatever). WordPress will just ignore it and it will be available at example.com/sitemap.xml … Read more

how can I check if I have sitemap?

Yes. Then it works. Add a new post and see if it changes. You can submit your sitemap to search engines but they will eventually pick it up regardless. Just give it time to see results — it’s not instant. Use Google Console https://www.google.com/webmasters/tools/sitemap-list to make sure it’s getting picked up.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)