Forum Replies Created
- AuthorPosts
- RolfKeymaster
Or, if you are not afraid of modifying PHP files, you can try this:
1. Go to Plugins > Plugin Editor and select XML Sitemap & Google News on the top right.
2. Open >models in files list on the right en choose the file functions.public-shared.php
3. There you will see the first function:function xmlsf_headers( $headers ) { // set noindex $headers['X-Robots-Tag'] = 'noindex, follow'; $headers['Content-Type'] = 'text/xml; charset=' . get_bloginfo('charset'); return $headers; }
Now add a new line right after
function xmlsf_headers( $headers ) {
and enter$headers['Status'] = '200';
there. It should look like:function xmlsf_headers( $headers ) { $headers['Status'] = '200'; // set noindex $headers['X-Robots-Tag'] = 'noindex, follow'; $headers['Content-Type'] = 'text/xml; charset=' . get_bloginfo('charset'); return $headers; }
Then click the button Update File at the bottom.
Let me know and I’ll check the response status of your sitemaps again 🙂
RolfKeymasterIt all looks correct. Only the response status 404 is wrong. I’ve only seen this happen on older WordPress versions without any posts published but that is certainly not the case here.
I wonder if it’s a conflict with another plugin.
Any chance you could create a temporary admin account so I can take a look on the back end? You can send me the details via the contact form or a private message (link “send a message” under my icon on the left here).
RolfKeymasterHi Eduardo, I checked your yearly post sitemaps a few times. They are really slow and I even saw the 5OO internal server error once.
Make sure you keep your option ‘Split by’ on ‘Month’. Your monthly sitemaps load fast enough and all are correct.
However, even though the response is correct, the status code that is returned by the server is 4O4 which means “not found”. I suspect Google sees this as a problem (and it is!) so it will not treat the sitemaps further.
Do you have any idea why your server or WordPress itself would return a 404 status code for posts or feeds?
RolfKeymasterOr… you can set the option Split by to Month which will make the sitemaps smaller and faster to index. 🙂
RolfKeymasterHi Eduardo, I’ve entered both your sitemap.xml and your sitemap-posttype-post.2019.xml in the online validator tool https://www.xml-sitemaps.com/validate-xml-sitemap.html and both are valid.
Maybe the error is an old one and will disappear after a while. Or you can try removing the sitemap from your Search Console and then submit it again. Hopefully the spider will re-validate it then.
RolfKeymasterIf you set “Split by: Month” you will have less posts per sitemap. On option to split by “Number” is planned for a future version but not ready yet…
RolfKeymasterSo you have only the XML Sitemap & Google News plugin activated now? And can you switch to Month or Year or does that still cause a problem?
RolfKeymasterWhen changing to Year or Month is when it causes problems. It does not group the links by year or month. You have consumed all the resources of the web server.
That is very strange… Is there any chance I can take a look on the admin side? If you create a temporary admin account and send me the details via https://premium.status301.com/contact/ ?
Or do you see any related errors in the server error log?
RolfKeymasterFrom this topic title I understand that the error occurs during plugin installation. Is that the case? Is that the Google News Advanced extension plugin or the main XML Sitemap & Google News plugin? And is that when installing or when activating?
RolfKeymasterHi Eduardo, I responded to your email about half an hour ago. Maybe it landed in the spam folder?
My question is: where does the error occur? On a post sitemap? In your mail there was a screen shot of memory errors, so it might help to set the “Split by” option to “Month” on Settings > XML Sitemap…
RolfKeymasterHi Michael, yes you need both XML Sitemap & Google News and Google News Advanced. Both plugins need to be activated but you only need the option “Google News Sitemap” activated on your Settings > Reading page. Now, you’ll have the advanced options available on your Settings > Google News admin page.
You may also activate the option “XML Sitemap” on your Settings > Reading but then you’ll need to make sure to disable the XML Sitemap in the Rank Math options. There will be an admin notice explaining the incompatibilities and what you need to do to work around them. You may also use the sitemap provided by Rank Math.
Whichever sitemap you choose, it should not impact traffic. An XML Sitemap is just a tool to help search engines find (new) content on your site. Once fully indexed, it will remain in the search engine results. If you do not add new content, you could even completely disable the sitemap and traffic should not be impacted. If you see a sharp drop in traffic, then it’s probably the new algorithm that is impacting your sites appearance in search results.
One thing though: be sure to NOT include any URLs in your sitemap that are set to “noindex” by the SEO plugin. For example, if you set taxonomy archive pages to noindex, then do not include taxonomies in the sitemap. Or if you give a particular page noindex, then also set it to be excluded from the sitemap.
You can use Google Search Console to monitor your sitemaps (both the normal and the news sitemap) for errors. And compare how many URLs provided by the sitemap are already indexed.
RolfKeymasterHi Kellen, you can check your sitemap in your browser to see if there is not some kind of redirection happening or an error message that can be interpreted as HTML. If you want me to take a look, please share a link to your sitemap. Or send it via the support form 🙂
RolfKeymasterFor dark background? Nice one 🙂
Tip: you can give the largeIndicator element a paramater “radius” too. It will create circles instead of hour bars… Use a large lineWidth or add fillColor to create dots.
RolfKeymasterHmmm, I notice there is a stacking order issue. The hour hand decoration is drawn on top of the minute hand when the two hands overlap (once each hour)… This will have to be fixed on script level I’m afraid.
RolfKeymasterOK, assuming you do not need an outer border, and the hands may still start in the center, and you do not need a seconds hand, we can now use the secondhand decoration for the minute hand inner rounded tip.
This makes room to use different colors for the hour and minute hands.
Here is an example (add a second clock widget to compare the two) with colors orange and green:
outerBorder: { lineWidth: 2, radius: 5, fillColor: "orange", color: "orange", alpha: 1 }, hourHand: { lineWidth: 12, startAt: 0, endAt: 60, color: "orange", alpha: 1 }, hourDecoration: { lineWidth: 2, startAt: 60, radius: 5, fillColor: "orange", color: "orange", alpha: 1 }, minuteHand: { lineWidth: 8, startAt: 0, endAt: 80, color: "green", alpha: 1 }, minDecoration: { lineWidth: 2, startAt: 80, radius: 3, fillColor: "green", color: "green", alpha: 1 }, secondDecoration: { lineWidth: 2, startAt: 0, radius: 3, fillColor: "green", color: "green", alpha: 1 }
- AuthorPosts