Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
Hi all-
I'm researching an issue for a potential client, namely, pulling in RSS feeds into an email template.
I am new to designing in HubSpot, but not new to troubleshooting tech/entry-level DIY coding.
I have been staring at this and this for the past couple of hours, and for the life of me, cannot find out a couple of things:
1. Is the 'default' value that returns the desired blog return whatever blog is associated with the account you are working in within the design manager?
2. Assuming that the answer to #1 is "yes," I cannot find the ID for the four different blogs the client has sent me. It is actually four different blogs on one site, and I have the URLs. However, from my google sleuthing it appears that I would need to be an admin on the blog account to grab the ID correct? I've tried inspecting elementing, hovering and searching for other ways to grab the blog IDs but failed miserably.
3. If the blogs are hosted on a different site (in this case WordPress) will this HubL code work? Or would separate code be required to display RSS feeds of the most recent blog content?
I'm tagging @Gonzalo since your other post would appear to be super helpful if I could figure out the blog ID issue.
To anyone who replies, thank you for encouraging me on my path to learning.
Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
First of all, I'm not an expert at explaining things, but I'll give it a go:
1 - Content / Content Settings / Marketing / Blog > Templates - you can define which html templates are used for your blog. If you create one template that has to be used over several blogs, the default blog is the blog that you are visiting. You only have to add a blog id if you want to pull in posts from a different blog (a blog which you are not viewing according to the URL)
2. You have to be logged in Hubspot, and go Content / Blogs
The URL will change depending on the Blog you clicked to view.
Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
You are right, HUBL code will only work on a page/site hosted on Hubspot itself.
A Hubspot blog does have an RSS feed and if you use the right plugin or if you're good a programming, you could retrieve several RSS feeds & display them on your own site.
Pulling in an RSS feed from a different site on Hubspot - That's something I would do with PHP which of course isn't available within hubspot. If you do the research using javascript, I guess this "could" work, but it's probably not the best way to do this. ( https://stackoverflow.com/questions/10943544/how-to-parse-an-rss-feed-using-javascript ). It's not something I would advice if you would like to pull in a whole blog & use paging etc.. could get really complex probably. Also you'd be duplicating data which for SEO reasons it's probably not the best idea 😮 - However if it's just a few posts you want to show in a sidebar feed or so, why not 🙂
With feed_sourceoption you can choose an external RSS (WP has built that functionality and by default its domain.com/feed/ so you can use that to get the info). The only problem using this block is that you loose some ability to customice the HTML output.
I am not sure what are you trying to do, but for some basic widget in the website like latest posts should be good enough!
Good luck!
If this answer helps you to solve your questions please mark it as a solution.
If you want to use it in an email it changes the rules of the game 🙂 I thought it was in the website 😉
For the email it's even simpler. You need to create a simple template email just to tweak a bit the design to fit the corporate design (but if you want to go deeper you can check the documentation).
Then you need to create a new Email: (Top menu) Content -> Email. Then Create email button -> choose the right template for the new email (here you need to be sure to mark the RSS email type after choosing the email template and before click on create).
Then you will be able to modify the email content. Go to the "Edit Modules sidebar" and click on Main Email Body. There you can add an external RSS link (like the one generated in WP mentioned in other post), the amount of posts to display and in the "item layout/style" you should have an small code like:
So you can tweak with some extra inlined CSS or use the content setting to setup the colors (the variables like primary_font_color are related to the content global settings).
Good luck!
If this answer helps you to solve your questions please mark it as a solution.
Here is my sample email (ignore the logo) that I was thinking of showing the client to demonstrate that it will hopefully meet her needs (and before I show her, I plan to pull her logo from her site, style it so it doesn't look stupid but like a decent email, have separation between the four blogs, titles, etc.) One item that didn't work in the code was pulling the images in, so I'll have to see if she absolutely needs that. Essentially this is showing two posts from each blog feed. (image below to demonstrate)
This should work don't you think? Thanks for the validation and all of your help!!! Much for me to learn, but I've learned a lot through this process. Thank you again @benvanlooy!
Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
First of all, I'm not an expert at explaining things, but I'll give it a go:
1 - Content / Content Settings / Marketing / Blog > Templates - you can define which html templates are used for your blog. If you create one template that has to be used over several blogs, the default blog is the blog that you are visiting. You only have to add a blog id if you want to pull in posts from a different blog (a blog which you are not viewing according to the URL)
2. You have to be logged in Hubspot, and go Content / Blogs
The URL will change depending on the Blog you clicked to view.
Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
@benvanlooy, I'm starting to feel like I should just be responding to you directly, as you appear to be my partner in crime in figuring out my design questions.
So thank you for responding so thoroughly and thoughfully to my inquiries. I think my job is now to pass it along.
Okay, but I think you answered my question. In this case the client wants to feature the most recent posts from her four different blogs hosted on one WordPress site. It sounds like if the blog is not hosted in HubSpot, the default command won't work. Now I'm wondering if HubL would allow to pull in RSS feeds from a blog hosted on a different site or not. She has been advised already that this isn't possible, but me being me, I wanted to confirm for myself.
Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
You are right, HUBL code will only work on a page/site hosted on Hubspot itself.
A Hubspot blog does have an RSS feed and if you use the right plugin or if you're good a programming, you could retrieve several RSS feeds & display them on your own site.
Pulling in an RSS feed from a different site on Hubspot - That's something I would do with PHP which of course isn't available within hubspot. If you do the research using javascript, I guess this "could" work, but it's probably not the best way to do this. ( https://stackoverflow.com/questions/10943544/how-to-parse-an-rss-feed-using-javascript ). It's not something I would advice if you would like to pull in a whole blog & use paging etc.. could get really complex probably. Also you'd be duplicating data which for SEO reasons it's probably not the best idea 😮 - However if it's just a few posts you want to show in a sidebar feed or so, why not 🙂
With feed_sourceoption you can choose an external RSS (WP has built that functionality and by default its domain.com/feed/ so you can use that to get the info). The only problem using this block is that you loose some ability to customice the HTML output.
I am not sure what are you trying to do, but for some basic widget in the website like latest posts should be good enough!
Good luck!
If this answer helps you to solve your questions please mark it as a solution.
Blog ID, RSS feed email template, multiple RSS feeds in email template
SOLVE
@Gonzalo and @benvanlooy - thank you! If this client works with me, I'll owe you both some cash.
I completely neglected to mention WHERE the client was hoping to pull in the feeds. She has an existing email template that she pulls in four RSS feeds from her one Wordpress site (i.e. she maintains four different blogs on the site). The email template features the most recent blog posts from those sections which is obviously super easy and convenient for her email and getting this content to her audience.
I'll get to checking out the other resources you both sent. Thank you thank you thank you so much!
And @Gonzalo you took exactly less than two days to respond to my question, so even with your massive amount of work you are still doing pretty awesome. Thank you!
If you want to use it in an email it changes the rules of the game 🙂 I thought it was in the website 😉
For the email it's even simpler. You need to create a simple template email just to tweak a bit the design to fit the corporate design (but if you want to go deeper you can check the documentation).
Then you need to create a new Email: (Top menu) Content -> Email. Then Create email button -> choose the right template for the new email (here you need to be sure to mark the RSS email type after choosing the email template and before click on create).
Then you will be able to modify the email content. Go to the "Edit Modules sidebar" and click on Main Email Body. There you can add an external RSS link (like the one generated in WP mentioned in other post), the amount of posts to display and in the "item layout/style" you should have an small code like:
So you can tweak with some extra inlined CSS or use the content setting to setup the colors (the variables like primary_font_color are related to the content global settings).
Good luck!
If this answer helps you to solve your questions please mark it as a solution.
Here is my sample email (ignore the logo) that I was thinking of showing the client to demonstrate that it will hopefully meet her needs (and before I show her, I plan to pull her logo from her site, style it so it doesn't look stupid but like a decent email, have separation between the four blogs, titles, etc.) One item that didn't work in the code was pulling the images in, so I'll have to see if she absolutely needs that. Essentially this is showing two posts from each blog feed. (image below to demonstrate)
This should work don't you think? Thanks for the validation and all of your help!!! Much for me to learn, but I've learned a lot through this process. Thank you again @benvanlooy!
Well I landed the job, so I owe you some cash. That being said, I am only in the beginning stages of being able to successfully manipulate code which is super empowering and then at times not so much.
The client has a developer that just suggested that I make use of an enclosure tag to grab the images along with the other info for the RSS listing (because apparently all of the feed elements are contained within that tag.)
I was told by HS yeterday they use the description tag to pull the RSS info. So my best guess is that the answer is I can't make use of the enclosure tag, unless I had the technical capability to custom write HubL code to create a new RSS listing that would pull from the enclosure tag instead of what their RSS listing module does by default. And I feel I would have no idea how to do that (and it could get really complicated.)
If you come to Inbound18 we can grab some beers/coffee 😉
Regarding the new client request. The only way my team managed that before is building a custom RSS (or editing the default provided by Wordpress) so now you add the featured image inside the description. But as said, then you won't have too much styles to manage there because it will be an image wrapped within the text (you can't go further than float and things like that).
I don't work with Wordpress any more so can't help there.
Good luck!
If this answer helps you to solve your questions please mark it as a solution.