How can I discover a website's feed URL?
When I grab Microsoft's blog HTML, I can see this:
<link rel="alternate" type="application/rss+xml" title="Site Home (RSS 2.0)" href="http://blogs.technet.com/rss.aspx" />
<link rel="alternate" type="application/rss+xml" title="B1ackD0g's Comments (RSS 2.0)" href="/members/B1ackD0g/comments/rss.aspx" />
<link rel="alternate" type="application/rss+xml" title="B1ackD0g's Activities (RSS 2.0)" href="/members/B1ackD0g/activities/rss.aspx" />
<link rel="alternate" type="application/rss+xml" title="Activities of People B1ackD0g Follows (RSS 2.0)" href="/members/B1ackD0g/activities/followersrss.aspx" />
<link rel="alternate" type="application/rss+xml" title="B1ackD0g's Groups Activities (RSS 2.0)" href="/members/B1ackD0g/activities/groupsrss.aspx" />
<link rel="alternate" type="application/rss+xml" title="The Official Microsoft Blog – News and Perspectives from Microsoft (RSS 2.0)" href="http://blogs.technet.com/b/microsoft_blog/rss.aspx" />
<link rel="alternate" type="application/atom+xml" title="The Official Microsoft Blog – News and Perspectives from Microsoft (Atom 1.0)" href="http://blogs.technet.com/b/microsoft_blog/atom.aspx" />
What I can assume here is that I can look for tags with hrefs that starts with "http://blogs.technet.com/b/microsoft_blog/"
Is this safe to assume?
What I need to do is basically get a URL and return its feed URL.
There is no safe way to assume what a website's feed url is without knowing it. In this example the attribute type value seems to be enough to determine the feed but that is not guaranteed to be set outside of your example. You can try and guess by searching the markup for links containing RSS or even testing against a service like feedburner http://feeds.feedburner.com/somedomain but you still can not be sure.
Related
I found so many different articles and tried to implement it, but I still can't get it working.
Google pagespeed recommends to preload few files, but I can't figure it out :/
I went ahead and updated my header.php
<head>
<!--custom preload -->
<link rel="preload" as="font" crossorigin="anonymous" href="https://allurehemp.com/allurehemp/assets/css/icons/fl-icons.woff2" >
<link rel="preload" as="style" crossorigin="anonymous" href="https://allurehemp.com/allurehemp/assets/css/fl-icons.css" >
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
And now i'm facing the following issue(s);
A preload for 'https://allurehemp.com/allurehemp/assets/css/fl-icons.css' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.
Any recommendation is appreciated =)
I realize this is quite delayed, but I just figured this out for my site. Maybe it will be helpful for others, if the OP doesn't need this anymore.
It's way simpler than I thought it would be. Below is what I did, and it worked. No more warning/penalty in PageSpeed Insights, and my performance score increased.
In your WP admin area/dashboard, go to Flatsome > Advanced > Global Settings (see screenshot below)
Screenshot of relevant Flatsome > Advanced > Global Settings area
Insert the following line into the 'Header Scripts' area:
<link rel='preload' href='//wp-content/themes/flatsome/assets/css/icons/fl-icons.woff2' as='font' type='font/woff2' crossorigin='anonymous'>
OTHER NOTES:
A. The link in my code snippet is relative to the site domain, so you don't need to change it and insert your domain or anything. The double slash forces the same security protocol as the origin site, so it should force load https if your site uses https (which it should).
B. This probably goes without saying, but you never know: If you're adding anything to the theme files, always use a child theme so your updates/changes don't get overwritten when you update your theme. Here's a great plugin I've used several times to create a child theme in WordPress: https://wordpress.org/plugins/child-theme-configurator/
C. The links you included in the in the header.php file didn't include the "type=" bit. I'm not certain, but this could have been the source of the problem for you.
D. I didn't add a preload link for the css file like you did because all my css is minified and combined. Also, that particular file is just a few lines anyway, so preloading likely won't make much of a difference.
Hopefully this helps! :)
I already have the social-share button for whatsapp on my webpage, but when you choose a contact to send, it only writes "title_content url" on the writing box. It seams that whatsapp doesn't see the meta tags of the webpage to create a nice box with the image, title and description.
I am using the following open-Graph meta tags and it is working fine with facebook social sharing:
<meta property="og:type" content="website" />
<meta property="og:title" content="{{event.name}}" />
<meta property="og:description" content="{{eventDescription event.information}}" />
<meta property="og:url" content="{{eventUrl url}}" />
<meta property="og:image" content="{{eventImage event}}" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="500" />
<meta property="fb:app_id" content="#####" />
I do not have a icon for my event, so I can't set up the tag:
<link rel="shortcut icon" href="###.ico" type="image/x-icon">
I tried to set it with a .png image but it didn't work. So, what else can I do to whatsapp see my website and render that box with the image, title and description?
I just found out what was happening. When you try to feed information to facebook or twitter crawlers you need a special way to do it. So you have to create a crawler route with filter and dynamic content (as you can see on this tutorial that i created: Tutorial ).
With whatsapp you don't need to worry about server side rendering. When I created my open-graph meta tags direct on the <head>.
Eddited:
Because I need meta tags that work dynamically, I had to stop using direct on the <head>. But the docHead() or any of the packages were not working for me. So I realised that whatsapp can work from server side and use the same og: tags that I already have for facebook.
I just needed to find its user-agent that is WhatsApp/2.17.107 A and add the permition like I did for the other ones on the server side route.
I have an issue with my website.
I have implemented below language tags on my website and I am targeting the website in Indonesian and English language for users on Indonesia, Malaysia, and Australia
zahiraccounting.com/ is Default page, redirects according to the IP to:
zahiraccounting.com/id/ (language: Indonesian, Target Country: Indonesia)
zahiraccounting.com/id-en/ (language: English, Target Country: Indonesia)
zahiraccounting.com/en-my/ (language: English, Target Country: Malaysia)
zahiraccounting.com/en-au/ (language: English, Target Country: Australia)
I put my code before on all those websites (the websites based on wordpress, i put it in header.php):
<link rel="alternate" href="http://zahiraccounting.com" hreflang="x-default" />
<link rel="alternate" href="http://zahiraccounting.com/id" hreflang="id" />
<link rel="alternate" href="http://zahiraccounting.com/id-en" hreflang="en" />
<link rel="alternate" href="https://zahiraccounting.com/en-my" hreflang="en-my" />
<link rel="alternate" href="https://zahiraccounting.com/en-au" hreflang="en-au" />
Now I can see an error in Google webmaster mentioned below:
Your site has no hreflang tags.
Google uses hreflang tags to match the user's language preference to
the right variation of your pages.
How can i fix this?
Unfortunately, there's no way (that I know of - I tried below) for me to set a canonical link per Tumblr post so I was thinking of setting the canonical link (sitewide on the Tumblr) to my WordPress homepage - good idea or bad?
I added a content source link to the post and tried adding this to my tumblr theme but none worked, the link would come out blank...
{block:PermalinkPage}
{block:Posts}
{block:ContentSource}
<link rel='canonical' href='{SourceURL}'>
{/block:ContentSource}
{/block:Posts}
{/block:PermalinkPage}
{block:PermalinkPage}
<link rel='canonical' href='{SourceURL}'>
{/block:PermalinkPage}
{block:PermalinkPage}
{block:ContentSource}
<link rel='canonical' href='{SourceURL}'>
{/block:ContentSource}
{/block:PermalinkPage}
All help is appreciated, thanks in advance.
This code should work, it will only render on permalink pages that have pagination. Your posts would need to have pagination for this to work though.
{block:PermalinkPagination}
<link rel="canonical" href="{Permalink}" />
{/block:PermalinkPagination}
If you don't have pagination in each post, this code would work.
{block:PermalinkPage}
<link rel="canonical" href="{Permalink}" />
{/block:PermalinkPage}
If you don't want it to be sitewide, this code should also work and will only render on post pages and not on others.
{block:PermalinkPage}{block:Date}
<link rel="canonical" href="{Permalink}" />
{/block:Date}{/block:PermalinkPage}
My blog rss feed is located at - Online Income Startup
http://www.onlineincomestartup.com/
But the feed is not being detected in some sites. Please guide me on how to fix the feed to make sure everything is working fine.
try add this in the head tag:
<link rel="alternate" type="application/rss+xml" href="http://www.onlineincomestartup.com/feed/" title="Online Income Startup" />